Advertisement
AndyE7

Mine Resume

Mar 22nd, 2022 (edited)
264
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. if fs.exists('/data/mineSize') then
  2. local timer = os.startTimer(5)
  3. print("Press enter in the next 5 seconds to reset Turtle")
  4. while true do
  5. local event, result = os.pullEvent()
  6. if event == "timer" and timer == result then
  7. print("Mining Resumed")
  8. shell.run("mine")
  9. break
  10. elseif event == "key" then
  11. if result == keys.enter then
  12. if fs.exists('/data/mineSize') then
  13. fs.delete("/data/mineSize")
  14. fs.delete("/data/currentLocation")
  15. break
  16. end
  17. end
  18. end
  19. end
  20. end
  21.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement