Posted
local filter = nil
local nilRep = ''
local blacklistedWords = {
'addwordshere'
}
-- for string patterns (for filter) https://developer.roblox.com/en-us/articles/string-patterns-reference
local Player = game.Players.LocalPlayer
Player.Chatted:Connect(function(msg)
local args = msg:split(' ')
if filter then
for i,v in pairs(args) do
for a,b in pairs(blacklistedWords) do
if v:lower():gsub(filter,nilRep):match(a:lower()) then
Player:Kick('\n\nracist')
end
end
end
elseif not filter then
for i,v in pairs(args) do
for a,b in pairs(blacklistedWords) do
if v:lower():match(a:lower()) then
Player:Kick('\n\nracist')
end
end
end
end
end)
well this is a bit silly innit?
Users viewing this thread:
( Members: 0, Guests: 1, Total: 1 )
Cancel
Post