Posted 29 November 2012 - 02:27 PM
This is my OS
--[[ All of this is from my own head. This is NOT copied. If you modify anything, please give me some credit :) thanks. ]]--
term.clear()
term.setCursorPos(1, 1)
textutils.slowPrint("Welcome to PantoOS")
i = 0
while(i < 1) do
io.write("$ ")
a = io.read()
a = a:lower()
if a == "HELP" or a == "help" then
print("HELP - gives all the commands")
print("CLS - clears the screen")
print("ABOUT - tells what PantoOS is about")
print("EXIT - leaves PantoOS without shutting down")
print("-S - shuts down PantoOS")
print("-R - reboots PantoOS")
print("RSLEFT or RSRIGHT - sets the output for redstone\n on either the left or right")
elseif a == "CLS" or a == "cls" then
term.clear()
term.setCursorPos(1, 1)
elseif a == "EXIT" or a == "exit" then
break
elseif a == "-S" or a == "-s" then
print("shutting down...")
sleep(1)
os.shutdown()
elseif a == "-R" or a == "-r" then
print("Restarting...")
sleep(1)
os.reboot()
elseif a == "RSRIGHT" or a == "rsright" then
rs.setOutput("right", true)
elseif a == "RSLEFT" or a == "rsleft" then
rs.setOutput("left", true)
elseif a == "ABOUT" or a == "about" then
print("PantoOS version 1.3\n\nNot copyright protected D:")
else
print("Unknown command '", a , "'")
end
end