Advertisement
Risk_exe

Untitled

Apr 12th, 2022
34
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1.  
  2. function Down()
  3. if turtle.detectDown() then
  4. turtle.digDown();
  5. end
  6. turtle.down();
  7. end
  8.  
  9. function Up()
  10. if turtle.detectUp() then
  11. turtle.digUp();
  12. end
  13. turtle.up();
  14. end
  15.  
  16. function Forward()
  17. if turtle.detect() then
  18. turtle.dig();
  19. end
  20. turtle.forward();
  21. end
  22.  
  23. local exvac = true;
  24.  
  25. function Begin()
  26. turtle.refuel();
  27. turtle.turnLeft();
  28.  
  29. for x = 1, 16, 1 do
  30.  
  31. for i = 1, 16, 1 do
  32. Forward();
  33. end
  34.  
  35. if exvac then
  36. turtle.turnRight(); Forward(); turtle.turnRight();
  37. else
  38. turtle.turnLeft(); Forward(); turtle.turnLeft();
  39. end
  40. exvac = not exvac;
  41.  
  42. end
  43.  
  44.  
  45. --[[ return to position ]]
  46. turtle.turnLeft();
  47. for i=1, 16, 1 do
  48. turtle.forward();
  49. end
  50. turtle.turnLeft(); turtle.turnLeft();
  51. Up();
  52. Wait();
  53.  
  54. end
  55.  
  56. function Wait()
  57. while true do
  58. local event = os.pullEvent();
  59. if event == 'redstone' then
  60. Begin();
  61. end
  62.  
  63. end
  64.  
  65. end
  66.  
  67. Wait();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement