Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if fs.exists("sys/isInstalled") == true then
- print("Os already installed, please eject disk")
- sleep(1)
- else
- local newUser
- local newPass
- term.clear()
- term.setCursorPos(1,1)
- print("+=================================================+")
- print(" PsychicOs GUI Beta V5.11 Installer ")
- print("+=================================================+")
- term.setCursorPos(1,5)
- term.write("Create username:_____________________")
- term.setCursorPos(1,7)
- term.write("Create password:_____________________")
- term.setCursorPos(17,5)
- newUser = read()
- term.setCursorPos(17,7)
- newPass = read()
- sleep(1)
- term.setCursorPos(1,9)
- term.write("Confirm username and password? Yes/No : ")
- local confirm = read()
- if confirm == "No" then
- sleep(1)
- os.reboot()
- elseif confirm == "Yes" then
- fs.makeDir("sys")
- local q = fs.open("sys/isInstalled", "w")
- q.writeLine("This Os is installed, this file tells the installer if os data has been written to this computer. If you want to do a fresh install, delete startup and the sys directory")
- q.close()
- local u = fs.open("sys/username", "w")
- u.writeLine(newUser)
- u.close()
- local p = fs.open("sys/password", "w")
- p.writeLine(newPass)
- p.close()
- shell.run("pastebin","get","7QBZYSRW","startup.file")
- shell.run("pastebin","get","dnp0mjay","os.file")
- fs.copy("disk/startup.file", "startup")
- fs.copy("disk/os.file", "sys/os")
- print("Please remove install disk after reboot")
- sleep(3)
- os.reboot()
- else
- sleep(1)
- os.reboot()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement