Advertisement
Marlingaming

CC Tweaked CCSPS Iron 2.0.0 - Security Crash Handler

Feb 4th, 2022 (edited)
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. os.pullEvent = os.pullEventRaw
  2.  
  3. local function Type(text)
  4. term.clearLine()
  5. print(text)
  6. end
  7.  
  8. function Loop()
  9. Type("Error Has Occured")
  10. Type("Options")
  11. Type("1 - Return to Menu")
  12. Type("2 - Reboot")
  13. Type("3 - Remove Error =WIP=")
  14. Type("4 - shutdown")
  15. local event, key
  16. repeat
  17. event, key = os.pullEvent("key")
  18. until key == keys.one or key == keys.two or key == keys.three or key == keys.four
  19. if key == keys.one then
  20. shell.run(settings.get("os_DesktopLoc"))
  21. elseif key == keys.two then
  22. shell.run("os/System/Scripts/PowerOff.lua","restart")
  23. elseif key == keys.three then
  24. shell.run("os/System/Scripts/PowerOff.lua", "shutdown")
  25. elseif key == keys.four then
  26. shell.run("os/System/Scripts/PowerOff.lua", "shutdown")
  27. end
  28. Loop()
  29. end
  30.  
  31. Loop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement