Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local distance = 0
- local answer = 0
- local answer2 = 0
- function intro()
- print ("hello, how long would you like the tunnel to be?")
- answer = read()
- print ("how many strips?")
- answer2 = read()
- print ("starting...")
- end
- function strips()
- repeat
- dig()
- distance = distance + 1
- until distance == answer
- turn.back()
- end
- end
- function dig()
- turtle.dig()
- turtle.forward()
- turtle.digUp()
- end
- function next()
- turtle.turnRight()
- turtle.forward()
- turtle.forward()
- turtle.turnRight()
- end
- function turn.back()
- turtle.turnRight()
- turtle.turnRight()
- end
- if distance == 0 then
- next()
- else
- turtle.moveforward()
- distance = distance - 1
- end
- end
- intro()
- strips()
Advertisement
Add Comment
Please, Sign In to add comment