Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --colors.white 1
- --colors.orange 2
- --colors.magenta 4
- --colors.lightBlue 8
- --colors.yellow 16
- --colors.lime 32
- --colors.pink 64
- --colors.gray 128
- --colors.lightGray 256
- --colors.cyan 512
- --colors.purple 1024
- --colors.blue 2048
- --colors.brown 4096
- --colors.green 8192
- --colors.red 16384
- --colors.black 32768
- term.clear()
- term.setCursorPos(1, 1)
- textutils.slowPrint("Booting...", 8)
- limeOut = "OFF"
- yellowOut = "CLOSED"
- splitterOutput = "OFF"
- oilOutput = "OFF"
- secretPassOutput = "OFF"
- nukeOutput = "OFF"
- rsBack = 0
- sleep(3)
- term.clear()
- sleep(2)
- function menuMain()
- sleep(0.1)
- if redstone.testBundledInput("right", 2) == true then
- passageState = "CLOSED"
- elseif redstone.testBundledInput("right", 2) == false then
- passageState = "OPEN"
- else
- term.clear()
- end
- term.clear()
- term.setCursorPos(20, 3)
- print ("GREETINGS "..username.."!")
- term.setCursorPos(16, 5)
- print ("WHAT WOULD YOU LIKE TO ACCESS?")
- term.setCursorPos(18, 6)
- print ("(enter corresponding number)")
- term.setCursorPos(1, 8)
- print ("1. Secret passage - "..yellowOut)
- print ("2. Information Screen - "..limeOut)
- -- print ("3. Splitter switch - "..splitterOutput)
- -- print ("4. Oil Fabricator - "..oilOutput)
- print ("5. Change User")
- term.setCursorPos(1, 16)
- answer = read()
- if answer == "711" then
- if passageOutput == "OFF" then
- redstone.setBundledOutput("right", 8)
- passageOutput = "ON"
- else
- redstone.setBundledOutput("right", 0)
- passageOutput = "OFF"
- end
- elseif answer == "1" then
- if yellowOut == "OPEN" then
- rsBack = rsBack-16
- yellowOut = "CLOSED"
- else
- rsBack = rsBack+16
- yellowOut = "OPEN"
- end
- elseif answer == "2" then
- if limeOut == "ON" then
- rsBack = rsBack-32
- limeOut = "OFF"
- else
- rsBack = rsBack+32
- limeOut = "ON"
- end
- elseif answer == "4" then
- if oilOutput == "ON" then
- rsBack = rsBack-32768
- oilOutput = "OFF"
- else
- rsBack = rsBack+32768
- oilOutput = "ON"
- end
- elseif answer == "5" then
- loginScreen()
- elseif answer == "secret" then
- menuSecret()
- else
- menuMain()
- end
- redstone.setBundledOutput("back", rsBack)
- menuMain()
- end
- function loginScreen()
- term.clear()
- term.setCursorPos(16, 5)
- print("TheWallOS v2.0")
- sleep(2)
- term.setCursorPos(16, 10)
- write("User: ")
- term.setCursorPos(16, 11)
- write("Pass: ")
- term.setCursorPos(23, 8)
- print("Login")
- term.setCursorPos(23, 18)
- print("WallOS (C) Ormzen")
- term.setCursorPos(22, 10)
- username = read()
- term.setCursorPos(16, 11)
- write("Pass: ")
- pass = read("*")
- curspos = 12
- while pass ~= "k157" do
- term.setCursorPos(16, curspos)
- print("Try again!")
- term.setCursorPos(16, 11)
- term.clearLine()
- write("Pass: ")
- pass = read("*")
- if curspos < 18 then
- curspos = curspos + 1
- end
- end
- menuMain()
- end
- function menuSecret()
- term.clear()
- term.setCursorPos(10, 3)
- print ("Welcome "..username..", to the secret menu.")
- term.setCursorPos(16, 5)
- print ("How may I help you?")
- term.setCursorPos(18, 6)
- print ("(enter corresponding number)")
- term.setCursorPos(1, 8)
- print ("1. Secret nuclear passage - "..secretPassOutput)
- print ("2. Nuclear power - "..nukeOutput)
- print ("3. Back to main menu")
- print ("")
- print ("")
- term.setCursorPos(1, 16)
- answer = read()
- if answer == "1" then
- if secretPassOutput == "ON" then
- rsBack = rsBack-1024
- secretPassOutput = "OFF"
- else
- rsBack = rsBack+1024
- secretPassOutput = "ON"
- end
- elseif answer == "2" then
- if nukeOutput == "ON" then
- rsBack = rsBack-1
- nukeOutput = "OFF"
- else
- rsBack = rsBack+1
- nukeOutput = "ON"
- end
- elseif answer == "3" then
- menuMain()
- else
- menuSecret()
- end
- redstone.setBundledOutput("back", rsBack)
- menuSecret()
- end
- loginScreen()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement