Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local blocks = 0
- term.write("How many blocks forward? :")
- blocks = read()
- function digAll()
- turtle.digUp()
- turtle.dig()
- turtle.digDown()
- end
- function gravel()
- if turtle.detect() then
- digAll()
- end
- if turtle.detectUp() then
- digAll()
- end
- end
- function One()
- for i = 1, blocks do
- inch()
- end
- end
- function inch()
- digAll()
- gravel()
- turtle.forward()
- end
- function turnR()
- turtle.turnRight()
- inch()
- inch()
- inch()
- turtle.turnRight()
- end
- function turnL()
- turtle.turnLeft()
- inch()
- inch()
- inch()
- turtle.turnLeft()
- end
- One()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement