Advertisement
Guest User

mspc

a guest
Sep 4th, 2015
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.54 KB | None | 0 0
  1. term.clear()
  2. term.setCursorPos(1,1)
  3.  
  4. --Functions
  5. local function start()
  6.   turtle.dig()
  7.   turtle.forward()
  8. end
  9.  
  10. local function cut()
  11.   turtle.detectUp()
  12.     while turtle.detectUp() do
  13.       turtle.digUp()
  14.       turtle.up()
  15.         if turtle.detectUp() == false then
  16.           while not turtle.detectDown() do
  17.             turtle.down()
  18.           end
  19.        end
  20.     end
  21. end
  22.  
  23. term.write("Begin?: ")
  24. input = read()
  25.   if input == "y" then
  26.    while turtle.detect() do
  27.     start()
  28.     cut()
  29.   end
  30.   else
  31.     print("Ok, goodbye")
  32.   end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement