Razvii

Chatbot

Mar 1st, 2020
112
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local chatbox = peripheral.find("chatbox")
  2.  
  3. chatbox.setLabel("myChatbox")
  4.  
  5. while true do
  6. local event, side, playerName, message = os.pullEvent("chat_message")
  7.  
  8. print(playerName .. " said: " .. message)
  9.  
  10. chatbox.tell(playerName, "Hello!")
  11. end
RAW Paste Data