Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --local oldPull = os.pullEvent
- --os.pullEvent = os.pullEventRaw
- term.clear()
- term.setCursorPos(1,1)
- local month = {"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}
- local password, statement
- password = month[math.random(1,12)]
- statement = "Which Month of the year am I thinking of?"
- local status, input
- repeat
- term.setTextColor(colors.blue)
- print(statement)
- term.setTextColor(colors.white)
- status, input = pcall(read)
- if input ~= password then
- term.setTextColor(colors.red)
- print("Incorrect.\n")
- end
- if input == "override" then
- redstone.setOutput("right", true)
- sleep(5)
- redstone.setOutput("right", false)
- end
- until input == password
- term.setTextColour(colors.green)
- print("ACCESS GRANTED!")
- term.setTextColour(colors.orange)
- print("Hit ESC to continue...")
- redstone.setOutput("right", true)
- sleep(5)
- redstone.setOutput("right", false)
- --os.pullEvent = oldPull
- --os.reboot()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement