Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("modem")
- modem.open("right", 700)
- print("Opened TV Channel, 700")
- while true do
- modem.receive()
- encrypted = modem.getmsg()
- color, bgcolor, message=encrypted:match("(%S+) (%S+) ?(.*)")
- rcolor = tonumber(color)
- rbgcolor = tonumber(bgcolor)
- if rbgcolor == nil then
- rbgcolor = 32768
- end
- if rcolor == nil then
- rcolor = 1
- end
- if not rbgcolor == 1 and 2 and 4 and 8 and 16 and 32 and 64 and 128 and 256 and 512 and 1024 and 2048 and 4096 and 8192 and 16384 and 32768 then
- rbgcolor = 32768
- end
- if not rcolor == 1 and 2 and 4 and 8 and 16 and 32 and 64 and 128 and 256 and 512 and 1024 and 2048 and 4096 and 8192 and 16384 and 32768 then
- rcolor = 1
- end
- term.setBackgroundColor(rbgcolor)
- term.setTextColor(rcolor)
- print(message)
- end
Advertisement
Add Comment
Please, Sign In to add comment