Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local bannedWordFilter = {
- 'fuc',
- 'fuck',
- 'bitch',
- 'btch',
- 'pussy',
- 'pssy',
- 'gay',
- 'g a y',
- 'fok',
- 'f!ck',
- 'hentai',
- 'c u m',
- 'cum',
- 'shit',
- 'sh1t',
- 'sht',
- 'sheit',
- 'peni',
- 'p3n1s',
- 'pen1s',
- 'p3nis',
- 'pen!s',
- 'p3n!s',
- 'sex',
- 's3x',
- 'f*ck',
- 'a$$',
- 'as$',
- 'a$s',
- 'wtf',
- 'cunt',
- 'whore',
- 'cvnt',
- 'wh0re',
- 'hoe',
- 'h0e'
- }
- function createCensor(word)
- local nword = ''
- for i=1, string.len(word) do
- nword = nword .. '*'
- end
- return nword
- end
- function filterMessage(str)
- if str:find'ยง' then
- return '[Content Deleted]'
- end
- local nstr = str
- for _,v in pairs(bannedWordFilter) do
- nstr = string.gsub(nstr, v, createCensor(v))
- end
- return nstr
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement