Advertisement
Commandcracker

installer

Oct 27th, 2018 (edited)
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.25 KB | None | 0 0
  1. --Check
  2. local w,h = term.getSize()
  3. if w == 51 and h == 19 then
  4.     pc = true
  5. else
  6.     pc = false
  7. end
  8.  
  9. --other suff idk
  10. term.write("Reading package lists")
  11. sleep(0.1)
  12. term.write(".")
  13. sleep(0.1)
  14. term.write(".")
  15. sleep(0.1)
  16. term.write(".")
  17. sleep(0.1)
  18. term.write(" Done")
  19. print()
  20. sleep(0.1)
  21. print("Building dependency tree")
  22. sleep(0.1)
  23. term.write("Reading state information")
  24. sleep(0.1)
  25. term.write(".")
  26. sleep(0.1)
  27. term.write(".")
  28. sleep(0.1)
  29. term.write(".")
  30. sleep(0.1)
  31. term.write(" Done")
  32. print()
  33. sleep(0.1)
  34.  
  35. term.write("Do you want to continue? [Y/n] ")
  36. local input = string.lower(string.sub(read(),1,1))
  37.  
  38. if input == "y" or input == "j" or input == "" then
  39. else
  40.     error("Abort.")
  41. end
  42.  
  43. local function get(file, code)
  44.     if fs.exists(file) then
  45.         fs.delete(file)
  46.     end
  47.     shell.run("pastebin get " .. code .. " " .. file)
  48. end
  49.  
  50. if term.isColor() then
  51.     if pc == true then
  52.         get("bootscreen", "P7jxqFAf")
  53.     else
  54.         get("bootscreen", "p0rQKh7u")
  55.     end
  56. else
  57.     if pc == true then
  58.         get("bootscreen", "cZxC8AD7")
  59.     else
  60.         get("bootscreen", "PzjiH1ie")
  61.     end
  62. end
  63.  
  64. get("startup ","M8ubuj5a")
  65. get("version", "KhvY4fvE")
  66.  
  67. print()
  68.  
  69. if term.isColor() then
  70.     term.setTextColor(colors.yellow)
  71. end
  72.  
  73. print("Rebooting computer")
  74.  
  75. sleep(3)
  76.  
  77. os.reboot()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement