Desert229

loottunnel

Oct 6th, 2022 (edited)
36
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. --anti gravel function
  2. local function digUntilEmpty()
  3. while turtle.detect() do
  4. turtle.dig()
  5. end
  6. end
  7.  
  8. x = 0
  9. d = 0
  10.  
  11. print("Enter length of tunnel:")
  12. local d = tonumber(io.read())
  13.  
  14. while x < d do
  15. digUntilEmpty()
  16. turtle.digUp()
  17. turtle.digDown()
  18. turtle.forward()
  19. x = x + 1
  20. end
  21.  
  22. x = 0
  23.  
  24. turtle.turnLeft()
  25. turtle.turnLeft()
  26.  
  27. while x < d do
  28. turtle.forward()
  29. x = x + 1
  30. end
Advertisement
Add Comment
Please, Sign In to add comment