bennyclams

Untitled

Aug 25th, 2024
23
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. peripheral.find("modem", rednet.open)
  2. rednet.host("alarm_listener", "alarm_listener")
  3. while true do
  4. local id, msg = rednet.receive()
  5. if string.lower(msg) == "alarm" then
  6. print("ALARM")
  7. redstone.setOutput("back", true)
  8. elseif string.lower(msg) == "ok" then
  9. print("OK")
  10. redstone.setOutput("back", false)
  11. end
  12. end
Advertisement
Add Comment
Please, Sign In to add comment