eea

bubblechat

eea
Nov 6th, 2021 (edited)
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. local cursewords = {
  2.  
  3. "fuck";
  4. "bitch";
  5. "shit";
  6. "hell";
  7. "ass";
  8.  
  9. };
  10.  
  11. function filter(message)
  12. local filmsg
  13. for i,v in pairs(cursewords) do
  14. if string.find(message, v) then
  15. filmsg = string.gsub(message, v, "#", string.len(v))
  16. return filmsg
  17. end
  18.  
  19. if not string.find(message, v) then
  20. filmsg = message
  21. return filmsg
  22. end
  23. end
  24. end
  25.  
  26. game.Chat.BubbleChatEnabled = true
  27. for i, v in pairs(game.Players:GetChildren()) do
  28. v.Chatted:Connect(function(msg)
  29. game.Chat:Chat(v.Character, filter(msg))
  30. end)
  31. end
  32.  
Add Comment
Please, Sign In to add comment