I tried this several different ways, including inside the if CenKik.censor. What am I doing wrong?? Sorry but I know nothing about coding!
local function Riplash( ply, text )
local filter = text
kikpls = nil
CenKik.forcetext = nil
for k,v in pairs( CenKik.words ) do
if string.find( string.lower( filter ), v, 1, true ) then
if CenKik.censor then
filter = string.Explode( " ", filter )
for a,b in pairs( filter ) do
print( filter[k] )
if string.find( string.lower( filter[a] ), v, 1, true ) then
local replace = string.rep( "*", string.len( v ) )
filter[a] = string.gsub( string.lower( filter[a] ), v, replace )
filter = string.Implode( " ", filter )
kikpls = true
end
end
end
if string.find( string.lower( filter[a] ), v, 1, true ) then
local replace = string.rep( "*", string.len( v ) )
filter[a] = string.gsub( string.lower( filter[a] ), v, replace )
filter = string.Implode( " ", filter )
kikpls = true
for _, ad in pairs ( player.GetAll() ) do
if ad:IsAdmin() then
ad:ChatPrint( ply:Nick() .. " attempted to say: " .. text )
end
end
end
end
end