Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local box = peripheral.find("chatBox") -- Finds the peripheral if one is connected
- if box == nil then error("chatBox not found") end
- while true do
- event, username, message = os.pullEvent("chat") -- Will be fired when someone sends a chat message
- messageN = tonumber(message) + math.random(1,9)
- messageS = tostring(messageN)
- box.sendMessage(messageS, username)-- Sends a message to the global chat
- --box.sendMessage(messageS, username) -- Sends a message with the prefix "[breez]"
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement