Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- This program has a master password, and a password for a user. It will open a door to the left of the computer.
- os.pullEvent = os.pullEventRaw
- while true do
- term.clear()
- term.setCursorPos(1,1)
- term.write("Password:")
- local password = read("")
- if password == "MasterKey" then
- term.clear()
- rs.setOutput("left", true)
- sleep(10)
- rs.setOutput("left", false)
- elseif password == "password1" then
- term.clear()
- rs.setOutput("left", true)
- sleep(10)
- rs.setOutput("left", false)
- else
- term.clear()
- term.setCursorPos(1,1)
- term.write("Incorrect. Rebooting")
- sleep(2)
- os.reboot()
- end
- end
Add Comment
Please, Sign In to add comment