Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --this is a Online Setup Script for CSP
- local Taxed = 20
- local Address = "n"
- local Properties = "n"
- print("--------------------")
- print("-------Setup--------")
- print("--------------------")
- local ConfirmFile = fs.open("os/os_SystemFiles/setupCompleted", "w")
- local UserApps = {"os_UserProfilePg","os_BankingApp"}
- local ProgramsName = {"Account","Banking"}
- local ProgramConnect = {"false","true"}
- ConfirmFile.writeLine(os.date())
- ConfirmFile.writeLine("Completed")
- ConfirmFile.close()
- settings.load(".settings")
- settings.define("UpdateFile",{ description = "used to figure out what file is used to update scripts", default = false})
- settings.define("Secure_WirelessProtocol",{ description = "Personal Security Protocol", default = "1000"})
- settings.set("Secure_WirelessProtocol",math.random(1000,9999))
- settings.save(".settings")
- local User
- local event
- if fs.exists("temp_SetupFile") == true then
- print("setup file found")
- print("setting up account off of File")
- local SetupFile = fs.open("temp_SetupFile","r")
- User = SetupFile.readLine()
- Taxed = SetupFile.readLine()
- Address = SetupFile.readLine()
- Properties = SetupFile.readLine()
- SetupFile.close()
- print("do you wish to delete the Transfer file?")
- print("y/n")
- repeat
- event = {os.pullEvent("key")}
- until event[2] == keys.n or event[2] == keys.y
- if event[2] == keys.y then
- fs.delete("temp_SetupFile")
- print("file Deleted")
- elseif event[2] == keys.n then
- print("moving file to archive")
- fs.move ("temp_SetupFile","os/os_TempFiles/Archive")
- end
- end
- if settings.get("os_Username") == "guest" then
- print("Please Enter User Name")
- while true do
- local event = {os.pullEvent("key")}
- if event[2] == keys.enter then break end
- User = read()
- end
- settings.set("os_Username",User)
- else
- User = settings.get("os_Username")
- print("User name Detected as = "..User)
- end
- print("Confirmed, to switch Name in the future, please")
- local file = fs.open("os/os_UserFiles/AccountDetails","w")
- file.writeLine(User)
- file.writeLine(Taxed)
- file.writeLine(Address)
- file.writeLine(Properties)
- file.close()
- settings.save(".settings")
- if settings.get("banking_System") ~= "n" then
- shell.run( settings.get("banking_System"),"setup")
- end
- print("Contact your local Administrator")
- print("---------------------")
- print("---Setup--Finished---")
- print("---------------------")
- os.sleep(3)
Add Comment
Please, Sign In to add comment