Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---[[ Variables
- lockCheck = redstone.getInput("back")
- --]]
- ---[[
- function doorLock()
- term.clear()
- term.setCursorPos(1, 1)
- print("Password?")
- local pwd = read("*")
- if pwd == "26845" then
- redstone.setOutput("back", false)
- end
- if pwd == "lock" then
- redstone.setOutput("back", true)
- end
- end
- --]]
- ---[[ Function to wrap input to a new line
- function newLine()
- local _,cY= term.getCursorPos()
- term.setCursorPos(1,cY+1)
- end
- --]]
- ---[[ Main menu
- function mainMenu()
- redstone.getInput("back")
- term.clear()
- term.setCursorPos(1,1)
- textutils.slowPrint("What would you like to do?")
- sleep(1)
- newLine()
- sleep(0)
- if redstone.getInput("back") == true then
- print("1. Disengage Reactor Door Lock")
- else
- print("1. Engage Ractor Door Lock")
- end
- textutils.slowPrint("2. Grant Shell Access")
- textutils.slowPrint("3. Exit")
- newLine()
- input = read()
- newLine()
- if input == "1" then
- doorLock()
- end
- if input == "2" then
- shell.run("shell")
- end
- if input == "3" then
- print("Goodbye!")
- sleep(1)
- os.shutdown()
- end
- end
- --]]
- while true do
- mainMenu()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement