Advertisement
LazerAio

.os

Mar 1st, 2022
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. local function viewBox(x,y,s,n)
  2. term.setBackgroundColor(colors.lightGray)
  3. term.setCursorPos(x,y)
  4. term.setCursorPos(x,y)
  5. print(n..(string.rep("-",string.len(s)-string.len(n))))
  6. term.setCursorPos(x,(y+1))
  7. print(s)
  8. term.setCursorPos(x,(y+2))
  9. print(string.rep("-",string.len(s)))
  10. end
  11. PL = 1
  12. term.setCursorPos(1,1)
  13. term.setBackgroundColor(colors.cyan)
  14. term.setTextColour(colors.white)
  15. term.clear()
  16. shell.run(".ProgramMenu")
  17. PL = PL - 1
  18. if PL == 0 then
  19. term.setCursorPos(1,1)
  20. term.setBackgroundColor(colors.blue)
  21. term.clear()
  22. viewBox(1,1,"You are about to leave AiOs!","OS")
  23. viewBox(1,3,"[R]eboot [S]hutdown [C]ancel","OS")
  24. term.setCursorPos(999,999)
  25. choise = read()
  26. if choise == "R" or choise == "r" then
  27. os.reboot()
  28. elseif choise == "S" or choise == "s" or choise == "" then
  29. os.shutdown()
  30. else
  31. shell.run(".os")
  32. end
  33. end
  34.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement