Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- X = 1
- Y = 10
- S = 2
- N = S+.1
- local t = {}
- local p = Instance.new("Model",Workspace)
- for x = 1,X do
- t[x]={}
- for y = 1,Y do
- local P = Instance.new("Part",Workspace)
- P.Anchored = (y == 1)
- P.FormFactor = "Custom"
- P.Size = Vector3.new(S,S,1)
- P:breakJoints()
- P.CFrame = CFrame.new((X-x)*N,(Y+2-y)*N,0)
- P:breakJoints()
- P.Transparency = 0
- ypcall(function()
- local AB = t[x][y-1]
- if AB and y ~= 1 then
- local W = Instance.new("Glue",P)
- W.Part1 = P
- W.Part0 = AB
- W.C0 = CFrame.new(0,-N,0)
- end
- local BK = t[x-1][y]
- if BK and x ~= 1 then
- local W = Instance.new("Glue",P)
- W.Part1 = P
- W.Part0 = BK
- W.C0 = CFrame.new(-N,0,0)
- end
- end)
- t[x][y]=P
- if x == X and y == Y and script.ClassName == "LocalScript" then
- local W = Instance.new("Weld",P)
- W.Part0 = P
- W.Part1 = game.Players.LocalPlayer.Character.Torso
- W.C0 = CFrame.new(0,0,0)*CFrame.Angles(0,0,math.rad(90))
- game.Players.LocalPlayer.Character.Humanoid.PlatformStand = true
- game.Players.LocalPlayer.CameraMode = "LockFirstPerson"
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement