Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function digIt()
- while turtle.detect() do
- turtle.dig()
- os.sleep(0.5)
- end
- turtle.forward()
- while turtle.detectDown() or turtle.detectUp() do
- turtle.digUp()
- turtle.digDown()
- end
- end
- local run = 0
- local x = 0
- term.write("Tunnel length: ")
- x = read()
- run = x * 0.5
- digIt()
- turtle.turnRight()
- digIt()
- turtle.turnLeft()
- turtle.turnLeft()
- turtle.forward()
- digIt()
- turtle.turnRight()
- for i = 1, run do
- digIt()
- turtle.turnRight()
- digIt()
- digIt()
- turtle.turnLeft()
- digIt()
- turtle.turnLeft()
- digIt()
- digIt()
- turtle.turnRight()
- end
- turtle.turnRight()
- turtle.forward()
- turtle.turnLeft()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement