Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- m = peripheral.wrap("top")
- local pass = "" --Change This
- local apass = ""--Change This
- -------------------------------
- --DO NOT EDIT BELOW THIS LINE--
- -------------------------------
- function monNoPassIn()
- m.clear()
- m.setCursorPos(1,1)
- m.write("No Password Entered! Please Enter a Password!")
- end
- function monIncPass()
- m.clear()
- m.setCursorPos(1,1)
- m.write("Password Incorrect! Access DENIED!")
- end
- function monCorPass()
- m.clear()
- m.setCursorPos(1,1)
- m.write("Password Correct! Access GRANTED!")
- end
- function monAdmin()
- m.clear()
- m.setCursorPos(1,1)
- m.write("Admin Panel Is Being Accessed! Access Cannot Be Granted!")
- end
- function monAdminDoorOpen()
- m.clear()
- m.setCursorPos(1,1)
- m.write("Admin Panel Override: Opening Door!")
- end
- function monAdminDoorClose()
- m.clear()
- m.setCursorPos(1,1)
- m.write("Admin Panel Override: Closing Door!")
- end
- function monAdminRTPass()
- m.clear()
- m.setCursorPos(1,1)
- m.write("Admin Panel OverrideL Showing Pass!")
- end
- function monAdminRPass()
- m.clear()
- m.setCursorPos(1,1)
- m.write("Admin Panel Override: Showing Password!")
- end
- function admin()
- term.clear()
- term.setCursorPos(1,1)
- monAdmin()
- print("Admin Panel")
- print("Available Commands: ")
- print("[1] Open Door")
- print("[2] Close Door")
- print("[3] Return To Password")
- print("[4] Reveal Password")
- local input = read()
- if input == "1" then
- monAdminDoorOpen()
- print("Opening Door")
- rs.setOutput("left", true)
- sleep(1)
- else if input == "2" then
- monAdminDoorClose()
- rs.setOutput("left", false)
- sleep(1)
- else if input == "3" then
- monAdminRTPass()
- sleep(2)
- password()
- else if input == "4" then
- monAdminRPass()
- print("Password is "..pass)
- sleep(3)
- else if input == "edit password" then
- shell.run("edit password")
- end
- end
- end
- end
- end
- end
- function password()
- monNoPassIn()
- term.clear()
- term.setCursorPos(1,1)
- print("Enter Password: ")
- local input = read("*")
- if input == pass then
- monCorPass()
- print("Correct Password! Opening Door.")
- rs.setOutput("left", true)
- sleep(3)
- rs.setOutput("left", false)
- else if input == apass then
- admin()
- end
- end
- end
- while true do
- password()
- sleep(3)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement