PieCrafted

PieCinema - Installer

Aug 3rd, 2015
520
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.83 KB | None | 0 0
  1. local cPrint = function(text)
  2.         local x, y = term.getSize()
  3.         local x2,y2 = term.getCursorPos()
  4.         term.setCursorPos(math.ceil((x / 2) - (text:len() / 2)), y2)
  5.         print(text)
  6. end
  7.  
  8. if term.isColor() then
  9. shell.run("clear")
  10. cPrint("Installing PieCinema")
  11. cPrint("Please Wait")
  12. sleep(2)
  13. fs.delete("startup")
  14. fs.delete("piecinema")
  15. shell.run("pastebin get pX1n482D startup")
  16. shell.run("pastebin get x0yd4h9D piecinema/logo")
  17. shell.run("pastebin get FRJwLjg7 piecinema/api/nfal")
  18. shell.run("pastebin get A7PsGvVk piecinema/welcome.nfa")
  19. shell.run("clear")
  20. cPrint("PieCinema Installed! Rebooting in 5 seconds.")
  21. sleep(5)
  22. os.reboot()
  23. else
  24.     shell.run("clear")
  25.     cPrint("PieCinema Requires an Advanced Computer!")
  26.     cPrint("Sorry for the inconvenience. Rebooting...")
  27.     sleep(5)
  28.     os.reboot()
  29. end
  30.  
  31. --[[if term.isColor() then --If Adv. Computer
  32.     shell.run("clear")
  33.     cPrint("PieCinema Installer")
  34.     print()
  35.     cPrint("Install PieCinema?")
  36.     print()
  37.     write("yes or no (no caps): ")
  38.     install = read()
  39.     if install == "yes" then
  40.         shell.run("clear")
  41.         cPrint("Installing PieCinema")
  42.         cPrint("Please Wait")
  43.         sleep(2)
  44.         fs.delete("startup")
  45.         fs.delete("piecinema")
  46.         shell.run("pastebin get pX1n482D startup")
  47.         shell.run("pastebin get x0yd4h9D piecinema/logo")
  48.         shell.run("pastebin get FRJwLjg7 piecinema/api/nfal")
  49.         shell.run("pastebin get A7PsGvVk piecinema/welcome.nfa")
  50.         shell.run("clear")
  51.         cPrint("PieCinema Installed! Rebooting in 5 seconds.")
  52.         sleep(5)
  53.         os.reboot()
  54.     elseif install == "no" then
  55.         shell.run("clear")
  56.         cPrint("Sorry to see you go :(")
  57.         cPrint("Rebooting...")
  58.         sleep(1)
  59.         os.reboot()
  60.     end
  61. else --If not Adv. Computer
  62.     shell.run("clear")
  63.     cPrint("PieCinema Requires an Advanced Computer!")
  64.     cPrint("Sorry for the inconvenience. Rebooting...")
  65.     sleep(5)
  66.     os.reboot()
  67. end--]]
Advertisement
Add Comment
Please, Sign In to add comment