Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local component = require("component")
- local modem = component.modem
- local cls = require("term").clear
- local E = require("event")
- modem.open(port)
- local port, e = 789
- while true do
- e = {E.pull()}
- if e[1] == "modem_message" and e[5] < 20 then
- if e[6]:sub(1, 1) == "#" then
- cls()
- end
- print(e[6])
- elseif e[1] == "key_down" then
- if e[4] == 200 or e[4] == 208 or e[4] == 28 then
- modem.broadcast(port, e[4])
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement