Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sModel = Instance.new("Model",workspace)
- sModel.Name = "Blocks"
- start = Instance.new("Part",sModel)
- start.Anchored = true
- start.Name = "start"
- local g = Instance.new("Part",game.ReplicatedStorage)
- g.Size = Vector3.new(4,4,4)
- g.Name = "Grass"
- g.Anchored = true
- g.Material = "Grass"
- g.BrickColor = BrickColor.Green()
- local gd = Instance.new("Part",game.ReplicatedStorage)
- gd.Size = Vector3.new(4,4,4)
- gd.Name = "Dirt"
- gd.Anchored = true
- gd.Material = "Slate"
- gd.BrickColor = BrickColor.new("Burnt Sienna")
- local gb = Instance.new("Part",game.ReplicatedStorage)
- gb.Size = Vector3.new(4,4,4)
- gb.Name = "Bedrock"
- gb.Anchored = true
- gb.Material = "Slate"
- gb.BrickColor = BrickColor.Black()
- levels = 5
- sizeX = 10
- sizeZ = 10
- currentLevel = 0
- startPos = workspace.Blocks.start.Position
- block = "air"
- lastBlock = nil
- currentX = 0
- currentZ = 0
- wait(2)
- function upanddown(moveX,moveZ)
- for i = 0,levels+1,1 do
- currentLevel = i
- print(i)
- if i == 0 then
- block = "Grass"
- elseif i ~= 0 and i < levels then
- block = "Dirt"
- elseif i == levels+1 then
- print("END")
- block = "Bedrock"
- end
- local function createBlock()
- local b = game.ReplicatedStorage[block]:Clone()
- lastBlock = b
- b.Position = startPos - Vector3.new(moveX,i * 4 ,moveZ)
- b.Parent = workspace.Blocks
- end
- createBlock()
- end
- end
- for i = 0,sizeZ-1,1 do
- for i = 0,sizeX-1,1 do
- upanddown(i*4,currentZ*4)
- wait(.05)
- end
- currentZ = currentZ + 1
- end
- workspace.Base:Remove()
- start:Remove()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement