Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- shell.run("clear")
- print("How many blocks forward?")
- front = tonumber(read()) - 1
- shell.run("clear")
- print("How many blocks to the right?")
- right = tonumber(read()) - 1
- shell.run("clear")
- print("Making platform please wait...")
- turtle.select(1)
- turtle.forward()
- turtle.placeDown()
- function line()
- for i=1,front do
- turtle.forward()
- turtle.placeDown()
- end
- end
- function square()
- line()
- LR = 1
- for i=1,right do
- if LR == 1 then
- turtle.turnRight()
- turtle.forward()
- turtle.placeDown()
- turtle.turnRight()
- elseif LR == 2 then
- turtle.turnLeft()
- turtle.forward()
- turtle.placeDown()
- turtle.turnLeft()
- LR = 0
- end
- LR = LR + 1
- line()
- end
- end
- square()
- if LR == 1 then
- turtle.turnRight()
- turtle.turnRight()
- for i=1,front do
- turtle.forward()
- end
- end
- turtle.turnRight()
- for i=1,right do
- turtle.forward()
- end
- turtle.turnRight()
- turtle.back()
- shell.run("clear")
- print("Done making the platform!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement