Advertisement
SpaceRanger4321

reboot

Feb 2nd, 2020
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. -- Functions
  2.  
  3. function printCentered(Text, Line)
  4. local x, y = term.getSize()
  5. x = x/2 - #Text/2
  6. term.setCursorPos(x, Line)
  7. if Color then
  8. col.set(Color, BkgColor)
  9. end
  10. term.write(Text)
  11. return true
  12. end
  13.  
  14. function reboot()
  15. term.setBackgroundColor(colors.yellow)
  16. term.setTextColor(colors.red)
  17. term.clear()
  18. printCentered("- "..string.char(7).." % Re-Booting % "..string.char(7).." -", 5)
  19. sleep(2)
  20. os.reboot()
  21. end
  22.  
  23. -- Running Functions
  24.  
  25. reboot()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement