Advertisement
Guest User

Test.lua

a guest
Apr 7th, 2020
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.43 KB | None | 0 0
  1. function dig()
  2.     while turtle.detect() do
  3.         turtle.dig()
  4.         os.sleep(0.5)
  5.     end
  6.     turtle.forward()
  7.     while turtle.detectDown() or turtle.detectUp() do
  8.         turtle.digDown()
  9.         turtle.digUp()
  10.     end
  11. end
  12.  
  13. local Digit = 0
  14.  
  15. term.write  ("Tunnel Length: ")
  16. Digit = read()
  17.  
  18. for i = 1, Digit do
  19.     dig()
  20. end
  21.  
  22. turtle.turnRight()
  23. turtle.turnRight()
  24.  
  25. for i = 1, Digit do
  26.     turtle.forward()
  27. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement