Advertisement
thegreatstudio

startup.lua

Mar 13th, 2014
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.43 KB | None | 0 0
  1. function main()
  2.   term.clear()
  3.   term.setBackgroundColor(colors.white)
  4.   term.clear()
  5.   term.setCursorPos(1,1)
  6.   term.setTextColor(colors.black)
  7.   print("Do you want to Install Isaac OS v1 Alpha?: ")
  8.   cmd = read()
  9.   if cmd == "yes" then
  10.     start()
  11.     else
  12.       abort()
  13.   end
  14. end
  15.  
  16. function start()
  17.   term.clear()
  18.   term.setBackgroundColor(colors.white)
  19.   term.clear()
  20.   term.setCursorPos(1,1)
  21.   term.setTextColor(colors.black)
  22.   print("Installing Isaac OS v1 Alpha")
  23.   sleep(1)
  24.   fs.makeDir("/isaacos")
  25.   fs.makeDir("/isaacos/system/x16")
  26.   fs.makeDir("/isaacos/system/api")
  27.   fs.makeDir("/isaacos/Desktop")
  28.   fs.makeDir("/isaacos/Programs")
  29.   fs.makeDir("/isaacos/Documents")
  30.   print("Downloading Dependencies!")
  31.   sleep(0.5)
  32.   shell.run("pastebin", "get", "c6iDXfeh", "/isaacos/system/x16/os.lua")
  33.   sleep(0.5)
  34.   print("Downloading All SystemFiles!")
  35.   sleep(0.5)
  36.   shell.run("pastebin", "get", "LJnpmary", "startup")
  37.   shell.run("pastebin", "get", "Uk9vKtkj", "/isaacos/system/system.lua")
  38.   shell.run("pastebin", "get", "E8uwgwfX", "/isaacos/Programs/cmd.lua")
  39.   shell.run("pastebin", "get", "ejCALkKQ", "/isaacos/Programs/program.lua")
  40.   sleep(3)
  41.   textutils.slowWrite("Done Installing!\n Restarting System..")
  42.   sleep(1)
  43.   os.reboot()
  44. end
  45.  
  46. function abort()
  47.   term.clear()
  48.   term.setCursorPos(1,1)
  49.   term.setTextColor(colors.red)
  50.   print("Aborting Installation for Isaac OS v1 Alpha")
  51.  
  52.  
  53. end
  54.  
  55. main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement