Advertisement
asteroidsteam

Installer JSOF Beta

Dec 13th, 2016
424
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.92 KB | None | 0 0
  1. function install()
  2. term.setTextColor(colors.lightBlue)
  3. term.setBackgroundColor(colors.white)
  4. term.clear()
  5. term.setCursorPos(3,1)
  6. term.setBackgroundColor(colors.red)
  7. term.clearLine()
  8. print("Installation Guide for JS DOS 1.7 Beta")
  9. term.setCursorPos(3,3)
  10. term.clearLine()
  11. print("This version is DEV so please do not complain")
  12. term.setCursorPos(3,6)
  13. term.clearLine()
  14. print("This will install a startup disk for JS DOS 1.7 to uninstall after installed just type \"Uninstall\" in CMD")
  15. -- Draw the text
  16. local tx, ty = 5, 10
  17. local text = "[Agree and Install]"
  18. term.setCursorPos(tx, ty)
  19. write(text)
  20. -- Event loop
  21. while true do
  22.   local e, but, cx, cy = os.pullEvent()
  23. if e == "mouse_click" then
  24.         if cx >= tx and cx <= tx + text:len() and cy == ty then
  25.          --PUT INSTALL CODE HERE
  26.         shell.clearAlias("help")
  27.         shell.setAlias("help", "/os/help")
  28.         shell.clearAlias("id")
  29.         shell.setAlias("id", "/os/id")
  30.         shell.run("cd /")
  31.         shell.run("pastebin get vxAb01H6 start.scr")   
  32.         shell.run("pastebin get k43FMEHt startup") 
  33.         shell.run("mkdir ASSETS")
  34.         shell.run("mkdir os")
  35.         shell.run("mkdir rom-3")
  36.         shell.run("mkdir loginkeys")
  37.         shell.run("mkdir sys")
  38.         shell.run("cd ASSETS")
  39.         shell.run("pastebin get rWADAe0c Desktop")
  40.         shell.run("pastebin get jbE5tBnn CMD")
  41.         shell.run("cd /os")
  42.         shell.run("pastebin get n6cN292s help")
  43.         shell.run("ppasebin get VFPKnRdd id")
  44.         shell.run("pastebin get g7XAUa1Z Desktop")
  45.         shell.run("pastebin get BtjcthXx uninstall")
  46.         shell.run("pastebin get kFmaBJQr un")
  47.         shell.run("pastebin get TFdKNWqq encrypt")
  48.         shell.run("pastebin get Fjm6cd2k login")
  49.         shell.run("pastebin get 189hC1AL ssh")
  50.         shell.run("pastebin get cdkz0YmT test")
  51.         shell.run("pastebin get EfJwgg2A syskey")
  52.         shell.run("cd /loginkeys")
  53.         shell.run("pastebin get a0HXru4P example")
  54.         shell.run("cd /sys")
  55.         shell.run("pastebin get HN2QvCqN update-scr.lua")
  56.         shell.run("cd /")
  57.         ID = math.random(100000000000)
  58.         file = fs.open("/rom-3/ID", "w")
  59.         file.write(ID)
  60.         file.close()
  61.         local file = fs.open("/key", "w")
  62.         file.write("key")
  63.         file.close()
  64.         term.setTextColor(colors.green)
  65.         term.setBackgroundColor(colors.black)
  66.         term.clear()
  67.         term.setCursorPos(1,1)
  68.         print("Your computers password is now: Key")
  69.         print("Type \"syskey <old passcode> <password>\" In terminal to set passcode")
  70.         print("Or go to the settings page once logged in to change your passcode.")
  71.         print("Press any key to continue")
  72.         os.pullEvent("key")
  73.          --END INSTALL CODE HERE
  74. os.reboot()
  75. end
  76. end
  77. end
  78. end
  79. if term.isColor() then
  80. local file = fs.exists("startup")
  81. if file == true then
  82.  
  83. print("Sorry, a startup file for a different OS is currently installed to delete type y/n")
  84. input = io.read()
  85. if input == "y" then
  86. fs.delete("startup")
  87. print("Installing...")
  88. os.sleep(1)
  89. install()
  90. end
  91. else
  92. install()
  93. end
  94. else
  95. print("Your computer does NOT have the correct graphics card to install!")
  96. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement