Advertisement
Marlingaming

CC Tweaked CCSPS Iron - Security Handler

Jan 24th, 2022 (edited)
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 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 - use Skeleton Desktop")
  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","restart")
  23. elseif key == keys.three then
  24. shell.run("os/System/Scripts/PowerOff", "shutdown")
  25. elseif key == keys.four then
  26. settings.load(".settings")
  27. settings.set("os_DesktopLoc","os/System/Programs/Desktop_1")
  28. settings.save(".settings")
  29. os.sleep(2)
  30. os.reboot()
  31. end
  32. Loop()
  33. end
  34.  
  35. Loop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement