Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --weiner
- function createBall(diam, color)
- local part=Instance.new"Part"
- part.Parent=workspace
- Instance.new("SpecialMesh", part).MeshType=Enum.MeshType.Sphere
- part.FormFactor="Custom"
- part.Size=Vector3.new(diam, diam, diam)
- part.Anchored=false
- part.CanCollide=true
- part.TopSurface='Smooth'
- part.BottomSurface='Smooth'
- if color then
- part.BrickColor=BrickColor.new(color)
- end
- return part
- end
- dcolor="Beige"
- ppdir=Vector3.new(0, 20, 10)
- ppdiam=1
- limit=300
- ppdir=ppdir.unit
- rate=.1
- erectness=1
- add=0.3
- game.Players.LocalPlayer:GetMouse().Button1Down:connect(function()
- add=-.5
- end)
- game.Players.LocalPlayer:GetMouse().Button1Up:connect(function()
- add=.5
- end)
- balls={}
- repeat wait() until game.Players.LocalPlayer.Character
- for i=1, limit do
- balls[i]=createBall(ppdiam, dcolor)
- balls[i].Name=i
- balls[i].Parent=game.Players.LocalPlayer.Character
- balls[i].Position=Vector3.new(0, 50, 0)
- local w=Instance.new("Weld", game.Players.LocalPlayer.Character:WaitForChild("HumanoidRootPart"))
- w.Part0=w.Parent
- w.Part1=balls[i]
- w.Name="Weld"..i
- end
- local w=Instance.new("Weld", game.Players.LocalPlayer.Character:WaitForChild("HumanoidRootPart"))
- w.Part0=w.Parent
- ball=createBall(ppdiam, dcolor)
- ball.Parent=game.Players.LocalPlayer.Character
- ball.Position=Vector3.new(0, 50, 0)
- w.Part1=ball
- w.C1=CFrame.new(ppdiam/2, 1+ppdiam/2, .55)
- local w=Instance.new("Weld", game.Players.LocalPlayer.Character:WaitForChild("HumanoidRootPart"))
- w.Part0=w.Parent
- ball=createBall(ppdiam, dcolor)
- ball.Parent=game.Players.LocalPlayer.Character
- ball.Position=Vector3.new(0, 50, 0)
- w.Part1=ball
- w.C1=CFrame.new(-ppdiam/2, 1+ppdiam/2, .55)
- balls[limit].BrickColor=BrickColor.new"Hot pink"
- coroutine.wrap(function()
- while true do
- rate=wait()
- erectness=math.max(math.min(erectness + (add*(rate/1)), 1), 0)
- local currentpos=Vector3.new(0, 2, .5)
- for i=1, limit do
- game.Players.LocalPlayer.Character.HumanoidRootPart["Weld"..i].C1=CFrame.new(currentpos.X, currentpos.Y, currentpos.Z)*CFrame.new(0, -1, 0)
- local upness=i^2/(limit^2)*(erectness-.5)
- upness=upness*5*ppdiam
- currentpos=currentpos+(Vector3.new(0, upness, ppdiam).unit*(math.max(ppdiam/limit, (ppdiam/2)*(1-erectness))))
- end
- end
- end)()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement