Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local left = true
- local done = false
- function mine()
- turtle.forward()
- turtle.digDown()
- end
- function detect()
- done = not done
- if done then
- return true
- end
- if turtle.detect() then
- left = not left
- turtle.down()
- end
- end
- while true do
- if turtle.detect() then
- if left then
- left = not left
- turtle.turnLeft()
- mine()
- detect()
- turtle.turnLeft()
- turtle.digDown()
- else
- left = not left
- turtle.turnRight()
- mine()
- detect()
- turtle.turnRight()
- turtle.digDown()
- end
- end
- mine()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement