Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.pullEvent = os.pullEventRaw -- prevents to Terminate
- local side = "right" -- The side your door is placed on (left or right)
- local password = "pass" -- The password you want ::WARNING:: The password is case sensetive.
- local opentime = 5 -- How long the door will be open (secounds)
- while true do
- term.clear()
- term.setCursorPos(1,1)
- write("Password: ") -- Computer asks you about the password
- local input = read("*")
- if input == password then
- term.clear()
- term.setCursorPos(1,1)
- print("Access Granted")
- rs.setOutput(side,true)
- sleep(opentime)
- rs.setOutput(side,false)
- else
- print("Access Denied") -- If you type in the wrong password, you will get access denied.
- sleep(2)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement