onPlayerChat event
setPlayerMuted
outputChatBox
setTimer (to unmute player after some time)
snippet (pass chat box text to this function to check if it contains bad words):
bad_words = { "pus-y", "fu-k" }
function isStringContainingBadWords(txt)
for key,val in pairs(bad_words) do
if (string.find(txt,val)) then
return true
end
end
return false
end