rednet.open("top") rednet.channel = 1 while true do print("Enter 'on' or 'off':") local userInput = read() if userInput == "on" then rednet.broadcast("on", "1") elseif userInput == "off" then rednet.broadcast("off", "1") else print("Invalid input. Only 'on' or 'off' are allowed.") end end