Advertisement
appleguy1999

Count

Apr 27th, 2014
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. local distance = 0
  2.  
  3. repeat
  4. turtle.forward()
  5. distance = distance + 1
  6. until turtle.detect()
  7. turtle.turnLeft()
  8. turtle.turnLeft()
  9. for n=1,distance do
  10. if turtle.detect() then
  11. turtle.dig()
  12. turtle.forward()
  13. else
  14. turtle.forward()
  15. end
  16. end
  17.  
  18. print(distance)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement