Advertisement
yonidrori

Untitled

Oct 17th, 2015
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. local bannedWordFilter = {
  2. 'fuc',
  3. 'fuck',
  4. 'bitch',
  5. 'btch',
  6. 'pussy',
  7. 'pssy',
  8. 'gay',
  9. 'g a y',
  10. 'fok',
  11. 'f!ck',
  12. 'hentai',
  13. 'c u m',
  14. 'cum',
  15. 'shit',
  16. 'sh1t',
  17. 'sht',
  18. 'sheit',
  19. 'peni',
  20. 'p3n1s',
  21. 'pen1s',
  22. 'p3nis',
  23. 'pen!s',
  24. 'p3n!s',
  25. 'sex',
  26. 's3x',
  27. 'f*ck',
  28. 'a$$',
  29. 'as$',
  30. 'a$s',
  31. 'wtf',
  32. 'cunt',
  33. 'whore',
  34. 'cvnt',
  35. 'wh0re',
  36. 'hoe',
  37. 'h0e'
  38. }
  39.  
  40. function createCensor(word)
  41. local nword = ''
  42. for i=1, string.len(word) do
  43. nword = nword .. '*'
  44. end
  45. return nword
  46. end
  47.  
  48. function filterMessage(str)
  49. if str:find'ยง' then
  50. return '[Content Deleted]'
  51. end
  52. local nstr = str
  53. for _,v in pairs(bannedWordFilter) do
  54. nstr = string.gsub(nstr, v, createCensor(v))
  55. end
  56. return nstr
  57. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement