Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local side = "left" -- Change this if you want to have to door/wire on a different side
- local password = "Password" -- Change this to your preferred password
- local input = ""
- term.clear()
- term.setCursorPos(1, 1)
- term.write("Password: ")
- input = read("*") -- The asterisk will replace any character that the user type,
- -- so passwords look realistic, if you dont want that, just
- -- delete the asterisk
- term.clear()
- term.setCursorPos(1, 1)
- if input == password then
- term.write("Access Granted") -- Change to your personalised message
- redstone.setOutput(side, true)
- sleep(5) -- Time that the door will remain open
- redstone.setOutput(side, false)
- os.shutdown() -- Computer will shutdown until next user wants to access
- else
- term.write("Access Denied")
- sleep(3)
- os.shutdown()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement