Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.pullEvent() = os.pullEventRaw()
- local pass = "password"
- while true do -- infinite loop
- term.clear() -- clear the screen
- term.setCursorPos(1,1)
- print("SecurityOS Access Terminal")
- sleep(2)
- print("Authentication Required")
- write("Password> ")
- local input = read("*")
- if input == pass then -- if the password is correct
- shell.run("door")
- break -- break the loop, end the program
- else -- if it's not
- print("Password Incorrect") -- say it's wrong
- sleep(1) -- wait some time and then start over (because of the loop)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement