Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.pullEvent = os.pullEventRaw
- local doorLocation = "side_goes_here"
- local password = "password_goes_here"
- local sleepTime = time_in_seconds
- while true do
- write("Enter the password: ")
- input = read("*")
- if input == password then
- print("Password Correct!")
- redstone.setOutput(doorLocation, true)
- sleep(sleepTime)
- redstone.setOutput(doorLocation, false)
- term.clear()
- term.setCursorPos(1,1)
- else
- print("Incorrect Password! Try again!")
- sleep(sleepTime)
- term.clear()
- term.setCursorPos(1,1)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement