Advertisement
machasins

autoMine CobbleGen

Aug 8th, 2022
830
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.64 KB | None | 0 0
  1. function mainLoop(input)
  2.     local waiting = false
  3.    
  4.     while true
  5.     do
  6.         if redstone.getInput(input) then
  7.             if waiting then
  8.                 print("Starting to mine...")
  9.                 waiting = false
  10.             end
  11.             if turtle.detect() then
  12.                 turtle.dig()
  13.             else
  14.                 os.sleep(0.1)
  15.             end
  16.         else
  17.             if not waiting then
  18.                 print("Waiting for redstone input...")
  19.                 waiting = true
  20.             end
  21.             os.sleep(0.1)
  22.         end
  23.     end
  24. end
  25.  
  26. args = { ... }
  27. inputSide = args[1]
  28.  
  29. mainLoop(inputSide)
  30.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement