Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Security = "true"
- user = "Ridan"
- Password = "pass"
- -- To Enable Password Security, Change The False
- -- In The Security Var To true, To Set The
- -- Security Off, Just Set The "true" To False.
- -- CASE SENSITIVE!
- function clear()
- term.clear()
- term.setCursorPos(1, 1)
- end
- function programEnder()
- n = lol
- if n == "lol" then
- back()
- else
- back()
- end
- end
- function back()
- write("Console: ")
- input = read()
- if input == "OSHelp" then
- OSHelp()
- else if input == "Lights" then
- lights()
- else if input == "lights" then
- lights()
- else if input == "shutdown" then
- shutdown()
- else if input == "worm" then
- worm()
- else if input == "lua" then
- lua()
- else if input == "adventure" then
- adventure()
- else if input == "OSCommands" then
- OSCommands()
- else if input == "id" then
- id()
- else if input == "version.stats" then
- versionstats()
- else
- print("No Such Program!")
- programEnder()
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- function lights()
- print("Want the lights on or off?")
- lig = read()
- if lig == "on" then
- redstone.setOutput("bottom", true)
- programEnder()
- else if lig == "off" then
- redstone.setOutput("bottom", false)
- programEnder()
- else
- print("Please enter on / off.")
- programEnder()
- end
- end
- end
- function worm()
- write("Starting Worm")
- sleep(0.2)
- write(".")
- sleep(1)
- write(".")
- sleep(0.5)
- print(".")
- sleep(0.3)
- shell.run("worm")
- programEnder()
- end
- clear()
- function gui()
- clear()
- print("Password Locked")
- term.setCursorPos(1, 3)
- print("+-----------------------------------------------+")
- print("|Password: |")
- print("+-----------------------------------------------+")
- term.setCursorPos(12, 4)
- end
- if Security == "true" then
- gui()
- n = read("*")
- if n == Password then
- clear()
- print("Acess Granted!")
- sleep(2)
- clear()
- write("Programs Loading")
- sleep(0.5)
- write "."
- sleep(0.5)
- write "."
- sleep(0.5)
- write "."
- sleep(1)
- clear()
- redstone.setOutput("bottom", true)
- print("Lights Are Too On!")
- print("Programs Loaded!")
- write("Welcome ")
- print(user)
- else
- clear()
- print("Acess Denied!")
- sleep(5)
- os.reboot()
- sleep(1)
- end
- else if Security == "false" then
- write("Programs Loading")
- sleep(0.5)
- write "."
- sleep(0.5)
- write "."
- sleep(0.5)
- write "."
- sleep(1)
- clear()
- redstone.setOutput("bottom", true)
- print("Lights Are Too On!")
- print("Programs Loaded!")
- write("Welcome ")
- print(user)
- else
- print("Somethings Rong With The Security Var! Please Now Terminate The Program And Edit Startup! (Change the security var to true (put quotes around the true) You to can chance it to false)")
- end
- end
- textutils.slowPrint("----------------------------------------------------")
- textutils.slowPrint("MegaOS 0.2 Loaded")
- textutils.slowPrint("No FireWall Found!")
- textutils.slowPrint("Please Enter OSHelp To Get Information!")
- textutils.slowPrint("Warning: Commands are CASE SENSITIVE!")
- textutils.slowPrint("----------------------------------------------------")
- -- Functions
- --+ Gui
- --+ Clear
- --+ Header
- --+ Back
- --+ ProgramEnder
- ----ProgramFuncs-----------
- ----+ Adventure
- ----+ OSHelp
- ----+ Shutdown
- ----+ Lua
- ----+ OSCommands
- ----+ Id
- ----+ Version.stats
- ---------------------------
- function header()
- clear()
- textutils.slowPrint("----------------------------------------------------")
- end
- function adventure()
- print("Starting Adventure Game..")
- sleep(1)
- shell.run("adventure")
- end
- function OSHelp()
- textutils.slowPrint("OperatingSystemHelpCenter Loading..")
- sleep(1)
- textutils.slowPrint("Loaded!")
- textutils.slowPrint("MegaOS Information:")
- textutils.slowPrint("MegaOS is a minecraft OperatingSystem Made By Ridan")
- textutils.slowPrint("To Get Out Of MegaOS, Just terminate the program (Ctrl + T for some secons) and u shud get ur > back (The CraftOS Console) If you wanna contact the coder of this, just send a email to ridan@live.be. Wanna know all the OS commands? type OSCommands!")
- programEnder()
- end
- function shutdown()
- print("Shutting Down..")
- sleep(0.5)
- print("Saving..")
- sleep(0.5)
- os.shutdown()
- end
- function lua()
- print("Warning: When U Exit Lua, You Will Be Exited Out Of The OS.")
- shell.run("lua")
- programEnder()
- end
- function OSCommands()
- print("List Of Commands Loading..")
- sleep(1)
- print("shutdown OSHelp")
- print("lua Lights")
- print("worm adventure")
- print("id version.stats")
- programEnder()
- end
- function id()
- shell.run("id")
- programEnder()
- end
- function versionstats()
- print("Current Version: 0.2")
- print("BugStats: Still Buggy, Not Even Buggy As 0.1")
- print("Commands: 8 commands")
- print("Public: No.")
- programEnder()
- end
- -- Programs
- -- OSHelp
- -- Lights
- -- Starter
- back()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement