KevY007

CC.BootProtector a.k.a SafeBooter (Compaitable with all OS)

Jul 22nd, 2016
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.37 KB | None | 0 0
  1. os.pullEvent = os.pullEventRaw
  2. shell.run("eject left")
  3. shell.run("eject top")
  4. shell.run("eject bottom")
  5. shell.run("eject back")
  6. shell.run("eject right")
  7. shell.run("eject front")
  8. term.clear()
  9. term.setCursorPos(1,1)
  10. print("Safe Boot CHIP DAC Initializing...\n")
  11. sleep(2)
  12. term.clear()
  13. print("Safe Boot CHIP DAC Initilized\n")
  14. sleep(0.3)
  15. term.clear()
  16. local w, h = term.getSize()
  17. term.setCursorPos(math.floor(w-string.len("Booting in Safe Mode........."))/2, 2)
  18. textutils.slowPrint("Booting in Safe Mode...............", 8)
  19. sleep(1.3)
  20. term.clear()
  21. if fs.exists("startup") then
  22.   fs.move("startup", "startup_old")
  23. end
  24. term.setCursorPos(math.floor(w-string.len("Safely Booted"))/2, 2)
  25. textutils.slowPrint("Safely Booted", 15)
  26. sleep(0.3)
  27. term.clear()
  28. term.setCursorPos(math.floor(w-string.len("Thanks for using this"))/2, 2)
  29. textutils.slowPrint("Thanks for using this!", 17)
  30. sleep(0.2)
  31. term.clear()
  32. write("Safe Boot Log:\n")
  33. local osvern = os.version()
  34. local complbl = os.getComputerLabel()
  35. local compid = os.getComputerID()
  36. if complbl == nil then
  37.   complbl = "Un-Set"
  38. end
  39. if compid == nil then
  40.   compid = "Unknown"
  41. end
  42. if osvern == nil then
  43.   osvern = "Unknown"
  44. end
  45. write("Operating System: "..osvern.. "\n")
  46. write("Computer Label: "..complbl.. "\n")
  47. write("Computer ID: " ..compid.. "\n")
  48. if fs.exists("startup_old") then
  49. fs.move("startup_old", "startup")
  50. end
Add Comment
Please, Sign In to add comment