Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local pullEvent = os.pullEvent
- os.pullEvent = os.pullEventRaw
- while true do
- term.clear()
- term.setCursorPos(1, 1)
- term.setTextColor(colors.orange)
- print("WARNING! Sludge containment breach detected!")
- term.setCursorPos(1, 2)
- term.setTextColor(colors.red)
- print("DANGER! Toxic gasses detected in facility interior!")
- term.setCursorPos(1, 3)
- print("Please contact an administrator.")
- term.setCursorPos(1, 4)
- term.setTextColor(colors.white)
- print("Enter password to open laser door: ")
- input = read()
- if input == "password" or input == "guest" then
- term.clear()
- term.setCursorPos(1, 1)
- term.setTextColor(colors.green)
- print("Thank you. Door will remain open for 10 seconds")
- redstone.setOutput("right",true)
- sleep(10)
- redstone.setOutput("right",false)
- elseif input == "debug" then
- term.clear()
- term.setCursorPos(1, 1)
- term.setTextColor(colors.lightBlue)
- print("Debug mode activated, hold CTRL + T to exit door program")
- os.pullEvent = pullEvent
- sleep(10)
- elseif input ~= "password" and input ~= "debug" and input ~= "guest" then
- term.clear()
- term.setCursorPos(1, 1)
- term.setTextColor(colors.red)
- print("Incorrect password. Please try again after 10 seconds.")
- sleep(10)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment