Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- term.clear()
- term.setCursorPos(1, 1)
- textutils.slowPrint("Starting alert server...")
- local modem = peripheral.wrap("back")
- local password = "pass123"
- modem.open(3000)
- modem.open(3001)
- while true do
- local event, modemSide, senderChannel,
- replyChannel, message, senderDistance = os.pullEvent("modem_message")
- if message == password then
- if senderChannel == 3000 then
- redstone.setOutput("bottom", true)
- end
- if senderChannel == 3001 then
- redstone.setOutput("bottom", false)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment