Bad = {":O", "fuck"}
function BadWords ( message, messageType )
local Findingdots = string.gsub(message, "([%s%_%*%+%?%.%(%)%[%]%{%}%\%/%|%^%$%-])", '')
for i, Findingbad in ipairs(Bad) do
if string.find( message, Findingbad) then
setPlayerMuted(source, true)
outputChatBox ( getPlayerName ( source ).." has mute bad words", getRootElement(), 255, 255, 0, true )
elseif string.find( Findingdots, Findingbad) then
setPlayerMuted(source, true)
outputChatBox ( getPlayerName ( source ).." has mute bad words", getRootElement(), 255, 255, 0, true )
end
end
end
addEventHandler ( "onPlayerChat", getRootElement(), BadWords )