Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- password = "ilovecookies" -- password to get in
- time = 3 -- time in seconds to get in the door
- side = "left" -- usable sides are top, bottom, left, right, front, and back
- while true do -- loop that runs forever
- rs.setOutput(side,false) -- close door
- print("What is the password to get in?") -- ask question
- input = read("*") -- get user's answer
- if input == password then -- you got the pass right
- rs.setOutput(side,true) --open door
- print("You got the password right!") -- congrats
- else -- if wrong
- rs.setOutput(side,false) -- close the door
- print("Sorry, but that's incorrect!") -- nope lol
- end -- end the if statement
- sleep(time) -- wait for 'time'
- end -- end the forever loop.
Add Comment
Please, Sign In to add comment