Make sure it's a server side and if there's any problem use debug .
local aTable = {
-- ['Word'] = { 'Out put of it' },
['bitch'] = { 'I Love You' },
}
addEventHandler('onPlayerChat',root,
function ( Massege )
local r,g,b = getPlayerNametagColor ( source ) or 255,255,255
for v in pairs ( aTable ) do
if string.find ( Massege,v ) then
cancelEvent ( )
outputChatBox ( ' '..getPlayerName ( source )..' : '..aTable [ v ] [ 1 ]..' ',root,r,g,b )
end
end
end
)