Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local MaxWarnings = 21 -- Set to how many warnings they need until they are banned :)
- local FormsOfTheJoke = { -- Dont say these words, m8 or m8's
- "autism",
- "aut1sm",
- "autistic",
- "aut1st1c",
- "disease boy",
- "disease girl",
- "d1sease b0y",
- "d1sease g1rl",
- "vaccine",
- "vacc1ne",
- "idiot",
- "idiotic",
- "Loser",
- "Fvck",
- "lol",
- "hey",
- "what's up",
- "Ayy Lmao",
- "yolo",
- "Dude",
- "Free Model",
- "Free Modeler",
- "Wtf",
- "Hax0r",
- "Hacker",
- "Hi",
- "G@y",
- "G&y",
- "G&y",
- "Hi",
- "Bye"
- "GoodBye"
- "Stop"
- "Ew"
- }
- local Banland = {} -- Sorry, F2P, but you didn't quit :P
- -- /\ Feel free to edit this one! :D
- local PlayerSavedData = {} -- Don't edit; it will prevent problems with the game :)
- -- /\ Usually Players rejoin to reset their votes, but it's a no-no this time :)
- function ChkChat(msg)
- local Msg = msg:gsub(" ", "\0")
- Msg = Msg:gsub(".", "\0")
- Msg = Msg:gsub(",", "\0")
- local Full = ""
- for v in Msg:gmatch("%Z+") do
- Full = Full .. v
- end
- for i, v in pairs(FormsOfTheJoke) do
- if Full:lower():find(v:lower()) then
- return true
- end
- end
- return false
- end
- function Warnings(plr, msg)
- if not PlayerSavedData[plr.Name] then
- PlayerSavedData[plr.Name] = 0
- end
- if ChkChat(msg) then
- PlayerSavedData[plr.Name] = PlayerSavedData[plr.Name] + 1
- if plr:FindFirstChild("PlayerGui") then
- local M = Instance.new("Message", plr.PlayerGui)
- if PlayerSavedData[plr.Name] <= MaxWarnings then
- 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"
- else
- table.insert(Banland, plr.Name)
- plr:Kick("You continued to do it your way, YOU HAD 21 WARNINGS M8, and now you are banned from the server, noob")
- end
- wait(#M.Text / 25 + 2.5)
- M:Destroy()
- end
- end
- end
- function ChatControl(plr)
- plr.Chatted:connect(function(msg)
- Warnings(plr, msg)
- end)
- end
- game.Players.PlayerAdded:connect(ChatControl)
- for i, v in pairs(game.Players:GetPlayers()) do
- ChatControl(v)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement