Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local oldpe = os.pullEvent
- local locked = false
- function lock()
- os.pullEvent = os.pullEventRaw
- locked = true
- end
- function unlock()
- term.clear()
- term.setCursorPos(1,5)
- write("Password: ")
- local input = read("*")
- if input ~= "cubix" then
- return
- end
- os.pullEvent = oldpe
- locked = false
- end
- lock()
- while locked do
- unlock()
- end
- sleep(0.2)
- shell.run("clear")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement