Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local pullevent = os.pullEvent
- os.pullEvent = os.pullEventRaw
- local side = "left"
- local password = "lotsofbacon"
- local opentime = 5
- while true do
- term.clear()
- term.setCursorPos(1,1)
- write("Password: ")
- local input = read("*")
- if input == "terminate" then
- term.clear()
- term.setCursorPos(1, 1)
- print("You have 10 seconds to terminate the passcode lock with CTRL+T.")
- os.pullEvent = pullevent
- sleep(10)
- end
- if input == password then
- term.clear()
- term.setCursorPos(1,1)
- print("Password correct!")
- rs.setOutput(side,true)
- sleep(opentime)
- rs.setOutput(side,false)
- else
- print("Password incorrect!")
- sleep(2)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement