Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local relays = { peripheral.find("redstone_relay") }
- if #relays == 0 then
- print("No redstone relays found")
- return
- end
- print("Found " .. #relays .. " redstone relays, toggling alarms")
- for i, relay in ipairs(relays) do
- if relay.getOutput("top") then
- print("Relay " .. i .. " is on, turning off")
- relay.setOutput("top", false)
- else
- print("Relay " .. i .. " is off, turning on")
- relay.setOutput("top", true)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment