Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local modem = peripheral.wrap("back")
- local password = "123"
- local channel = 20
- --------------------
- modem.open(channel)
- while true do
- local event, modemSide, senderChannel, replyChannel, message, senderDistance = os.pullEvent("modem_message")
- if message == password then
- modem.transmit(channel, channel, "accepted")
- print("password accepted")
- else
- modem.transmit(channel, channel, "denied")
- print ("password denied (" ..message.. ")")
- end
- sleep(0.1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement