Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement