Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --VaultDoor
- local pw = "bacon"
- local opentime = 5
- rednet.open("back")
- while true do
- term.clear()
- term.setCursorPos(1,1)
- print("Skriv passord: ")
- local input = read("*")
- if input == pw then
- term.clear()
- term.setCursorPos(1,1)
- print("Passord korrekt!")
- rednet.broadcast("VAULT_OPEN")
- print("Dør åpen")
- sleep(opentime)
- rednet.broadcast("VAULT_CLOSED")
- print("Dør lukket")
- sleep(1)
- else
- term.clear()
- term.setCursorPos(1,1)
- print("Feil passord!")
- sleep(5)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement