Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local pullEvent = os.pullEvent
- os.pullEvent = os.pullEventRaw
- while true do
- redstone.setOutput("back", false)
- term.clear()
- term.setCursorPos(1, 1)
- term.setTextColor(colors.blue)
- print("Welcome to the IC-TECH Offsite R&D Facility.")
- term.setCursorPos(1, 2)
- term.setTextColor(colors.red)
- print("WARNING! This is a secure facility!")
- term.setCursorPos(1, 3)
- print("Authorised personnel only.")
- term.setCursorPos(1, 5)
- term.setTextColor(colors.white)
- print("Please enter password to open the door:")
- input = read()
- if input == "guest" then
- term.clear()
- term.setCursorPos(1, 1)
- print("Password correct. Door will remain open for 10 seconds.")
- redstone.setOutput("back", true)
- sleep(10)
- redstone.setOutput("back", false)
- elseif input == "password" then
- term.clear()
- term.setCursorPos(1, 1)
- print("Password correct. Door will remain open for 10 seconds.")
- redstone.setOutput("back", true)
- sleep(10)
- redstone.setOutput("back", false)
- elseif input == "debug" then
- term.clear()
- term.setCursorPos(1, 1)
- print("Debug mode activated. Use CTRL + T after 5 seconds to exit program.")
- sleep(5)
- os.pullEvent = pullEvent
- else
- term.clear()
- term.setCursorPos(1, 1)
- term.setTextColor(colors.red)
- print("Incorrect Password!")
- sleep(30)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment