Advertisement
aidanthescriptor101

weiner

Jan 30th, 2016
569
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.22 KB | None | 0 0
  1. --weiner
  2.  
  3.  
  4. function createBall(diam, color)
  5. local part=Instance.new"Part"
  6. part.Parent=workspace
  7. Instance.new("SpecialMesh", part).MeshType=Enum.MeshType.Sphere
  8. part.FormFactor="Custom"
  9. part.Size=Vector3.new(diam, diam, diam)
  10. part.Anchored=false
  11. part.CanCollide=true
  12. part.TopSurface='Smooth'
  13. part.BottomSurface='Smooth'
  14. if color then
  15. part.BrickColor=BrickColor.new(color)
  16. end
  17. return part
  18. end
  19.  
  20. dcolor="Beige"
  21.  
  22. ppdir=Vector3.new(0, 20, 10)
  23. ppdiam=1
  24. limit=300
  25. ppdir=ppdir.unit
  26.  
  27. rate=.1
  28. erectness=1
  29. add=0.3
  30. game.Players.LocalPlayer:GetMouse().Button1Down:connect(function()
  31. add=-.5
  32. end)
  33. game.Players.LocalPlayer:GetMouse().Button1Up:connect(function()
  34. add=.5
  35.  
  36. end)
  37. balls={}
  38. repeat wait() until game.Players.LocalPlayer.Character
  39. for i=1, limit do
  40. balls[i]=createBall(ppdiam, dcolor)
  41. balls[i].Name=i
  42. balls[i].Parent=game.Players.LocalPlayer.Character
  43. balls[i].Position=Vector3.new(0, 50, 0)
  44. local w=Instance.new("Weld", game.Players.LocalPlayer.Character:WaitForChild("HumanoidRootPart"))
  45. w.Part0=w.Parent
  46. w.Part1=balls[i]
  47. w.Name="Weld"..i
  48. end
  49. local w=Instance.new("Weld", game.Players.LocalPlayer.Character:WaitForChild("HumanoidRootPart"))
  50. w.Part0=w.Parent
  51. ball=createBall(ppdiam, dcolor)
  52. ball.Parent=game.Players.LocalPlayer.Character
  53. ball.Position=Vector3.new(0, 50, 0)
  54. w.Part1=ball
  55. w.C1=CFrame.new(ppdiam/2, 1+ppdiam/2, .55)
  56.  
  57. local w=Instance.new("Weld", game.Players.LocalPlayer.Character:WaitForChild("HumanoidRootPart"))
  58. w.Part0=w.Parent
  59. ball=createBall(ppdiam, dcolor)
  60. ball.Parent=game.Players.LocalPlayer.Character
  61. ball.Position=Vector3.new(0, 50, 0)
  62. w.Part1=ball
  63. w.C1=CFrame.new(-ppdiam/2, 1+ppdiam/2, .55)
  64.  
  65.  
  66. balls[limit].BrickColor=BrickColor.new"Hot pink"
  67. coroutine.wrap(function()
  68. while true do
  69. rate=wait()
  70. erectness=math.max(math.min(erectness + (add*(rate/1)), 1), 0)
  71. local currentpos=Vector3.new(0, 2, .5)
  72. for i=1, limit do
  73. game.Players.LocalPlayer.Character.HumanoidRootPart["Weld"..i].C1=CFrame.new(currentpos.X, currentpos.Y, currentpos.Z)*CFrame.new(0, -1, 0)
  74. local upness=i^2/(limit^2)*(erectness-.5)
  75. upness=upness*5*ppdiam
  76. currentpos=currentpos+(Vector3.new(0, upness, ppdiam).unit*(math.max(ppdiam/limit, (ppdiam/2)*(1-erectness))))
  77. end
  78. end
  79. end)()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement