Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("Press 'S' to terminate the script")
- function refuel()
- while true do
- turtle.refuel()
- local fuelLevel = turtle.getFuelLevel()
- print(fuelLevel)
- sleep(1)
- end
- end
- function terminate()
- local event, key = os.pullEvent("key")
- while key == keys.s do
- os.reboot()
- end
- end
- while true do
- parallel.waitForAll(terminate,refuel)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement