Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.pullEvent = os.pullEventRaw
- local pass = "" --Enter your pass-phrase here.
- local bypass = "" --Enter a pass-phrase to escape to the system here.
- if pass == "" or bypass == "" then
- print("Please set the password and bypass phrase before running the program by editing it.")
- return
- elseif pass == bypass then
- print("Please make sure your password and bypass phrase are not the same.")
- return
- end
- while true do
- term.clear()
- term.setCursorPos(1, 1)
- write("Enter password: ")
- input = read("*")
- if input == pass then
- term.setTextColor(colors.green)
- print("Access granted.")
- redstone.setOutput("left", true) --Make sure to replace "left" with the side the door is on.
- pcall(sleep,3) --Set the door open time here (seconds).
- redstone.setOutput("left", false)
- term.setTextColor(colors.white)
- elseif input == bypass then
- term.setTextColor(colors.green)
- print("System bypass granted.")
- term.setTextColor(colors.white)
- return
- else
- term.setTextColor(colors.red)
- print("Access denied.")
- term.setTextColor(colors.white)
- pcall(sleep,2)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement