Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- spawners = {false, false}
- function toggle(i)
- if spawners[i] == true then spawners[i] = false
- else spawners[i] = true
- end
- if spawners[0] == true then redstone.setOutput("top",true)
- else redstone.setOutput("top", false)
- end
- if spawners[1] == true then redstone.setOutput("bottom", true)
- else redstone.setOutput("bottom", false)
- end
- end
- rednet.open("left")
- while true do
- senderId, message, distance = rednet.receive()
- print("Message recieved: " ..message)
- if message == "1" then
- toggle(1)
- elseif message == "0" then
- toggle(0)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment