Marlingaming

CC Tweaked CCSPS Iron - Poweroff Menu

Jan 25th, 2022
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. os.pullEvent = os.pullEventRaw
  2. local tArg = {...}
  3.  
  4. local PoweroffTime = 4
  5.  
  6. local function Clear()
  7. term.clear()
  8. term.setCursorPos(1,1)
  9. end
  10.  
  11. local function Screen()
  12. term.setBackgroundColor(colors.blue)
  13. Clear()
  14. print("Powering off")
  15. print("==Closing==")
  16. end
  17.  
  18. local function Complete()
  19. print("Completed")
  20. print("Signing out")
  21. os.sleep(3)
  22. if tArg[1] == "shutdown" then
  23. os.shutdown()
  24. elseif tArg[1] == "restart" then
  25. os.reboot()
  26. end
  27. end
  28.  
  29. Screen()
  30. os.sleep(PoweroffTime)
  31. Complete()
Advertisement
Add Comment
Please, Sign In to add comment