Advertisement
M0n5t3r

Untitled

Jun 18th, 2018
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. local up = 0
  2. local right_movement = 0
  3. local last = "left"
  4.  
  5. while true do
  6. if turtle.detectUp() == true then
  7.  
  8. while (turtle.detectUp()) do
  9. local success, t = turtle.inspectUp()
  10. if (string.find(t.name, "dirt") == nil) then
  11. turtle.digUp()
  12. turtle.up()
  13. up = up + 1
  14. else
  15. break
  16. end
  17. end
  18. repeat
  19. turtle.down()
  20. up = up - 1
  21. until up == 0
  22. else
  23. repeat
  24. turtle.down()
  25. up = up - 1
  26. until up == 0
  27. end
  28. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement