Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- names = { [1]="Fair" }
- rednet.open("back")
- speaker = peripheral.wrap("bottom")
- detector = peripheral.wrap("top")
- while true do
- event,name = os.pullEvent()
- if event == "player" then
- access = false
- for i=1,#names do
- if names[i] == name then
- access = true
- end
- end
- if access then
- rednet.broadcast("fairopen")
- speaker.speak("Hello "..name..". Welcome to the base. Please walk down the stairs for entrance. The entrance will close again in 5 seconds.",0)
- os.sleep(15)
- rednet.broadcast("fairclose")
- else
- speaker.speak("Sorry "..name..". You are not on the list of authorized to enter.")
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment