Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local f = nil
- local y,z = 1,1
- local extra = 50
- local max = 300
- local stairs = {}
- function set_prop(i,p)
- if i and p then else return end
- local n = i/25
- local center = CFrame.new(0,0.5,20)
- local r1 = math.abs(math.sin(n))
- local r2 = math.abs(math.cos(n))
- p.Color = Color3.new(r1,r1,r2)
- p.Size = Vector3.new(20, y, z)
- p.Transparency = 0
- p.Anchored = true
- p.CanCollide = true
- p.Locked = true
- local checkpoints = math.floor(i/50)
- local cf2 = CFrame.new()
- local size2 = Vector3.new(0,0,0)
- if checkpoints == i/50 then
- size2 = size2+Vector3.new(extra, 0, extra)
- end
- for i = 1,checkpoints do
- cf2 = cf2*CFrame.new(0,0,extra/2)
- end
- p.Size = Vector3.new(20, y, z)+size2
- p.CFrame = center*CFrame.new(0,(i*y)-y,i*z)*cf2
- stairs[p] = i
- p.Parent = f
- end
- function make_stair(i)
- local p = Instance.new("Part")
- set_prop(i,p)
- p.Changed:Connect(function()
- coroutine.wrap(function()
- p:Destroy()
- end)()
- end)
- end
- function make_folder()
- f = Instance.new("Folder",workspace)
- f.ChildRemoved:Connect(function(v)
- local i = stairs[v]
- game:GetService("RunService").Heartbeat:Wait()
- coroutine.wrap(function()
- v:Destroy()
- end)()
- coroutine.wrap(function()
- make_stair(i)
- end)()
- end)
- end
- workspace.ChildRemoved:Connect(function(v)
- if v == f then
- make_folder()
- end
- end)
- make_folder()
- for i = 1,max do
- make_stair(i)
- end
Add Comment
Please, Sign In to add comment