Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function mainLoop(input)
- local waiting = false
- while true
- do
- if redstone.getInput(input) then
- if waiting then
- print("Starting to mine...")
- waiting = false
- end
- if turtle.detect() then
- turtle.dig()
- else
- os.sleep(0.1)
- end
- else
- if not waiting then
- print("Waiting for redstone input...")
- waiting = true
- end
- os.sleep(0.1)
- end
- end
- end
- args = { ... }
- inputSide = args[1]
- mainLoop(inputSide)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement