Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- shell.run("hidden/api/all")
- if fs.exists("/hidden/CompletedSetups/.setupFinished") then
- cls()
- shell.run("hidden/main/boot")
- else
- write("Setup > ")
- cmd=read()
- m = " : "
- s = " "
- function cls()
- shell.run("clear")
- term.setTextColor( colors.blue )
- print("Hidden OS")
- term.setTextColor( colors.white )
- end
- if string.find(cmd, "Hidden>") then
- cmd = cmd:gsub("Hidden>", "")
- if string.find(cmd, "Admin>") then
- cmd = cmd:gsub("Admin>", "")
- if cmd=="help" then
- print("HiddenOS (Hidden > Admin > )")
- print("-------------------------")
- print("help", m, "Shows a list of all commands.")
- print("version", m, "Show a little version list.")
- print("CreateUser", m, "Creating a user.")
- elseif cmd=="version" then
- print("")
- term.setTextColor( colors.green )
- print("Hidden OS")
- term.setTextColor( colors.purple )
- print("-------------------------------------")
- term.setTextColor( colors.pink )
- print("Version: 1.0.0")
- print("Terminal Interface: 1.4.6")
- print("CodeSnipper: 1.0.0")
- term.setTextColor( colors.purple )
- print("-------------------------------------")
- term.setTextColor( colors.white )
- print("")
- elseif cmd=="CreateUser" then
- shell.run("hidden/api/CreateUser")
- elseif cmd=="setup.finish()" then
- if fs.exists("/hidden/CompletedSetups/.firstUserSetupDone") then
- local setupDone = fs.open("/hidden/CompletedSetups/.setupFinished", "w")
- setupDone.writeLine("state=true")
- setupDone.close()
- shell.run("hidden/main/boot")
- else
- print("You haven't completed first user setup, write \"Instructions\" for more help.")
- end
- else
- term.setTextColor( colors.red )
- print("Hidden > Admin > \"", cmd, "\" is not a command")
- term.setTextColor( colors.white )
- end
- elseif cmd=="help" then
- term.setTextColor( colors.red )
- print("Sorry, there is no help menu in SETUP for \"Hidden>\"")
- term.setTextColor( colors.white )
- else
- term.setTextColor( colors.red )
- print("Hidden > \"", cmd, "\" is not a command")
- term.setTextColor( colors.white )
- end
- elseif cmd=="help" then
- print("")
- print("Help menu")
- print("------------------------")
- print("help", m, "Brings up a list with basic commands.")
- term.setTextColor( colors.yellow ) print("---") term.setTextColor( colors.white )
- print("cls", m, "It do the same thing as \"clear\" but faster to \n type.")
- term.setTextColor( colors.yellow ) print("---") term.setTextColor( colors.white )
- print("instructions", m, "This shows you how you create a user\n and how you finish the setup!")
- print("Categorizations")
- term.setTextColor( colors.lime )
- print("----------------------------")
- term.setTextColor( colors.white )
- print(s, "Hidden>")
- print(s, s, "Admin>")
- print(s, s, s, "help")
- print(s, s, s, "version")
- print(s, s, s, "CreateAdmin")
- print("")
- elseif cmd=="cls" then
- cls()
- elseif cmd=="instructions" then
- cls()
- term.setTextColor( colors.lime )
- print("Hidden OS Instructions")
- term.setTextColor( colors.red )
- print("---------------------------------------------------")
- term.setTextColor( colors.orange )
- print("Creating a user")
- term.setTextColor( colors.purple )
- print("-----------------------------")
- term.setTextColor( colors.white )
- print("To create a user you will need to write: \"Hidden>Admin>CreateUser\" in order to create an Owner account!")
- print("")
- term.setTextColor( colors.orange )
- print("Finish setup")
- term.setTextColor( colors.purple )
- print("-----------------------------")
- term.setTextColor( colors.white )
- print("After that you will need to finish the setup by typing: \"Hidden>Admin>setup.finish()\" to end the setup mode.")
- else
- term.setTextColor( colors.red )
- print("\"", cmd, "\" is not a command")
- term.setTextColor( colors.white )
- end
- shell.run("hidden/setup/console")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement