Advertisement
bennyuoppd

Untitled

May 21st, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. term.clear()
  2. term.setCursorPos(1,1)
  3. term.setTextColour(colors.lime)
  4. local drive = peripheral.wrap("right")
  5.  
  6. if fs.exists("stillmoving") then
  7. datafile = fs.open("stillmoving", "r")
  8. howtomove = textutils.unserialize(datafile.readAll())
  9. print(howtomove[1]..howtomove[2])
  10. datafile.close()
  11. if drive.move(howtomove[1],true,false) then
  12. if howtomove[2] == 1 then fs.delete("stillmoving") else howtomove[2] = howtomove[2] - 1 end
  13. local datafile = fs.open("stillmoving", "w")
  14. datafile.write(howtomove)
  15. datafile.close()
  16. end
  17. term.write("We R Stuck lol, I'll try again in like 15 seconds or so XD")
  18. sleep(15)
  19. os.reboot()
  20. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement