Advertisement
MLGMatthew

"ROBLOX" Anti Offensive/Non offensive Words, Script

Mar 5th, 2016
386
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.30 KB | None | 0 0
  1.  
  2. local MaxWarnings = 21 -- Set to how many warnings they need until they are banned :)
  3. local FormsOfTheJoke = { -- Dont say these words, m8 or m8's
  4. "autism",
  5. "aut1sm",
  6. "autistic",
  7. "aut1st1c",
  8. "disease boy",
  9. "disease girl",
  10. "d1sease b0y",
  11. "d1sease g1rl",
  12. "vaccine",
  13. "vacc1ne",
  14. "idiot",
  15. "idiotic",
  16. "Loser",
  17. "Fvck",
  18. "lol",
  19. "hey",
  20. "what's up",
  21. "Ayy Lmao",
  22. "yolo",
  23. "Dude",
  24. "Free Model",
  25. "Free Modeler",
  26. "Wtf",
  27. "Hax0r",
  28. "Hacker",
  29. "Hi",
  30. "G@y",
  31. "G&y",
  32. "G&y",
  33. "Hi",
  34. "Bye"
  35. "GoodBye"
  36. "Stop"
  37. "Ew"
  38.  
  39. }
  40. local Banland = {} -- Sorry, F2P, but you didn't quit :P
  41. -- /\ Feel free to edit this one! :D
  42.  
  43. local PlayerSavedData = {} -- Don't edit; it will prevent problems with the game :)
  44. -- /\ Usually Players rejoin to reset their votes, but it's a no-no this time :)
  45.  
  46. function ChkChat(msg)
  47. local Msg = msg:gsub(" ", "\0")
  48. Msg = Msg:gsub(".", "\0")
  49. Msg = Msg:gsub(",", "\0")
  50. local Full = ""
  51. for v in Msg:gmatch("%Z+") do
  52. Full = Full .. v
  53. end
  54. for i, v in pairs(FormsOfTheJoke) do
  55. if Full:lower():find(v:lower()) then
  56. return true
  57. end
  58. end
  59. return false
  60. end
  61.  
  62. function Warnings(plr, msg)
  63. if not PlayerSavedData[plr.Name] then
  64. PlayerSavedData[plr.Name] = 0
  65. end
  66. if ChkChat(msg) then
  67. PlayerSavedData[plr.Name] = PlayerSavedData[plr.Name] + 1
  68. if plr:FindFirstChild("PlayerGui") then
  69. local M = Instance.new("Message", plr.PlayerGui)
  70. if PlayerSavedData[plr.Name] <= MaxWarnings then
  71. M.Text = "You are being warned, stupid noob\nYou have " .. tostring(MaxWarnings - PlayerSavedData[plr.Name]) .. " until you are banned from the server\nContinue if you like, but you will face consequences\nIf you are not doing so on purpose, then please kindly reframe from using that word, as it may be offensive to others"
  72. else
  73. table.insert(Banland, plr.Name)
  74. plr:Kick("You continued to do it your way, YOU HAD 21 WARNINGS M8, and now you are banned from the server, noob")
  75. end
  76. wait(#M.Text / 25 + 2.5)
  77. M:Destroy()
  78. end
  79. end
  80. end
  81.  
  82. function ChatControl(plr)
  83. plr.Chatted:connect(function(msg)
  84. Warnings(plr, msg)
  85. end)
  86. end
  87.  
  88. game.Players.PlayerAdded:connect(ChatControl)
  89. for i, v in pairs(game.Players:GetPlayers()) do
  90. ChatControl(v)
  91. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement