Advertisement
InTesting

The Swear Log

Jul 15th, 2019
477
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.57 KB | None | 0 0
  1. local players = game:GetService("Players")
  2.  
  3. local unhuman_words = {'shid'}
  4.  
  5. local function EF_OnChatted(msg,person)
  6.     for _,v in pairs(unhuman_words)do
  7.         if string.find(msg:lower(),
  8.             v:lower()      
  9.         )then
  10.             print('Jesus got mad:')
  11.             print('Swear word found: '..v)
  12.             print('Person: '..person)
  13.             print('Msg: '..msg)
  14.             break
  15.         end
  16.     end
  17. end
  18.  
  19. for _,v in pairs(players:GetPlayers())do
  20.     v.Chatted:Connect(function(msg)
  21.         EF_OnChatted(msg,v)
  22.     end)
  23. end
  24. players.PlayerAdded:ConnecT(function(v)
  25.     v.Chatted:Connect(function(msg)
  26.         EF_OnChatted(msg,v)
  27.     end)
  28. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement