Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- term.clear()
- term.setCursorPos(1,1)
- password = "[your passord]" --Sets the password
- debug = "debug" --Sets debugging password
- write("Enter your password: ")
- input = read() --Input the password
- term.clear() --Clearing the terminal, and...
- term.setCursorPos(1,1) --...THEN setting the cursor position
- if input == password then
- print("Password Correct!") --If the input is correct!
- rs.setOutput("left",true) --Change this and the setOutput to the side the door is on
- sleep(2) --Pause for 5 seconds
- rs.setOutput("left",false)
- os.shutdown() --Shut down the computer
- elseif input == debug then
- exit() --Exits the program
- else
- print("Password Incorrect!") --If the input is incorrect! (Oh Noes!)
- sleep(2)
- os.shutdown() --Shut down the computer
- end --Ends the 'if' block
Add Comment
Please, Sign In to add comment