Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --this is a installer for the Banking system
- local BankingFormat = "banking_public1"
- local OSSystem = "n"
- local Paths = {}
- local MScript
- local ClientApp
- local function Clear()
- term.setbackgroundColor(colors.orange)
- term.clear()
- term.setCursorPos(1,1)
- end
- local function CreateFolders(startPath)
- Paths[1] = startPath.."/BankingScripts/.Secure"
- Paths[2] = startPath.."/BankingScripts/Config"
- fs.makeDir(Paths[1])
- fs.makeDir(Paths[2])
- MScript = Paths[1].."/BankingDirector_"..BankingFormat
- end
- local function Downloader()
- if BankingFormat == "banking_public1" then
- shell.run("pastebin","get","77LLGHBP",MScript)
- shell.run("pastebin","get","k6aAwARg",ClientApp)
- end
- settings.load(".settings")
- if OSSystem == "CCSPS" then
- shell.run("os/os_Programs/Scripts/ClientAppSetup","Banking Client",ClientApp)
- end
- local function GetOsType()
- settings.load(".settings")
- OSSystem = settings.get("OperatingSystem")
- end
- local function GetOsSet(action)
- local item
- if action == "Path" then
- if OSSystem == "CCSPS" then
- item = "os/os_Programs"
- ClientApp = "os/os_Programs/ClientApps/BankingClient_"..BankingFormat
- end
- end
- return(item)
- end
- local function SetupSettings()
- settings.load(".settings")
- settings.define("banking_Balance", "temp Banking Display")
- settings.set("banking_Balance",0)
- settings.define("banking_System", "the Script that handles all Banking Requests")
- settings.set("banking_System",MScript)
- settings.save(".settings")
- end
- local function InstallMenu()
- Clear()
- print("Banking Service Installer")
- print("hello! and thanks for choosing us as your banking Service, to begin please choose your desired Banking Format")
- print("1 - banking_public1")
- print("2 - cancel")
- local event, key
- repeat
- event, key = os.pullEvent("key")
- until key == keys.one or key == keys.two
- if key == keys.one then
- BankingFormat = "banking_public1"
- elseif key == keys.two then
- exit
- end
- GetOsType()
- CreateFolders(GetOsSet("Path"))
- SetupSettings()
- Downloader()
- shell.run(MScript,"setup")
- print("download Complete")
- os.sleep(3)
- Clear()
- end
- InstallMenu()
Add Comment
Please, Sign In to add comment