OOC Only chat tags?

Hey, I was wandering if anybody could help me with making it so my chat tags only work when using /looc or /ooc (or // alternatively to /ooc)
This is because honestly in RP, there’s no need for a flash-looking tag when it’s RP anyway.

My current code, which is just working chat tags for chat, I just want it so it only works with LOOC and OOC:


local Tags = {}
Tags["vip"] = { Color( 255, 255, 0 ), "VIP", Color( 255, 255, 255 ) }
Tags["moderator"] = { Color( 0, 255, 30 ), "Moderator", Color( 255, 255, 255 ) }
Tags["admin"] = { Color( 0, 255, 255 ), "Admin", Color( 255, 255, 255 ) }
Tags["superadmin"] = { Color( 255, 0, 100 ), "S-Admin", Color( 255, 255, 255 ) }
Tags["developer"] = { Color( 255, 150, 50 ), "Developer", Color( 255, 255, 255 ) }
Tags["communityman"] = { Color( 255, 0, 200 ), "Community Manager", Color( 255, 255, 255 ) }
Tags["hadmin"] = { Color( 70, 70, 255 ), "H-Admin", Color( 255, 255, 255 ) }
Tags["eventmanager"] = { Color( 210, 210, 0 ), "Event Manager", Color( 255, 255, 255 ) }
Tags["Event Manager"] = { Color( 210, 210, 0 ), "Event Manager", Color( 255, 255, 255 ) }
Tags["Mod EM"] = { Color( 210, 210, 0 ), "Event Manager", Color( 255, 255, 255 ) }
Tags["owner"] = { Color( 255, 50, 50 ), "Owner", Color( 255, 255, 255 ) }


local function AddChatTags( ply, msg, team, dead, prefixText, col1, col2 )
	
	if GAMEMODE.FolderName == "starwarsrp" then
		
		local text = {}
		local tag = Tags[ply:GetNWString("usergroup")]
		
		if tag then
			table.insert( text, tag[3] )
			table.insert( text, "[" )
			table.insert( text, tag[1] )
			table.insert( text, tag[2] )
			table.insert( text, tag[3] )
			table.insert( text, "] " )
		end
		
		table.insert( text, col1 )
		table.insert( text, prefixText )
		
		table.insert( text, col2 )
		table.insert( text, ": " .. msg )
		
		chat.AddText( unpack( text ) )
		
		return true
	
	end

end
hook.Add( "OnPlayerChat", "ChatTagsDarkRP", AddChatTags )

[lua]
local Tags = {}
Tags[“vip”] = { Color( 255, 255, 0 ), “VIP”, Color( 255, 255, 255 ) }
Tags[“moderator”] = { Color( 0, 255, 30 ), “Moderator”, Color( 255, 255, 255 ) }
Tags[“admin”] = { Color( 0, 255, 255 ), “Admin”, Color( 255, 255, 255 ) }
Tags[“superadmin”] = { Color( 255, 0, 100 ), “S-Admin”, Color( 255, 255, 255 ) }
Tags[“developer”] = { Color( 255, 150, 50 ), “Developer”, Color( 255, 255, 255 ) }
Tags[“communityman”] = { Color( 255, 0, 200 ), “Community Manager”, Color( 255, 255, 255 ) }
Tags[“hadmin”] = { Color( 70, 70, 255 ), “H-Admin”, Color( 255, 255, 255 ) }
Tags[“eventmanager”] = { Color( 210, 210, 0 ), “Event Manager”, Color( 255, 255, 255 ) }
Tags[“Event Manager”] = { Color( 210, 210, 0 ), “Event Manager”, Color( 255, 255, 255 ) }
Tags[“Mod EM”] = { Color( 210, 210, 0 ), “Event Manager”, Color( 255, 255, 255 ) }
Tags[“owner”] = { Color( 255, 50, 50 ), “Owner”, Color( 255, 255, 255 ) }

local function AddChatTags( ply, msg, team, dead, prefixText, col1, col2 )
if string.sub(msg, 1, 2) == “//” or string.sub(msg, 1, 4) == “/ooc” or string.sub(1, 5) == “/looc” then
if GAMEMODE.FolderName == “starwarsrp” then

	   local text = {}
	   local tag = Tags[ply:GetNWString("usergroup")]
	
	     if tag then
		    table.insert( text, tag[3] )
		    table.insert( text, "[" )
		    table.insert( text, tag[1] )
		    table.insert( text, tag[2] )
		    table.insert( text, tag[3] )
		    table.insert( text, "] " )
	     end
	
	            table.insert( text, col1 )
	            table.insert( text, prefixText )
	
	           table.insert( text, col2 )
	           table.insert( text, ": " .. msg )
	
	          chat.AddText( unpack( text ) )
	
	         return true

          end
       end

end
hook.Add( “OnPlayerChat”, “ChatTagsDarkRP”, AddChatTags )
[/lua]

try that, sorry for bad indentation but the facepunch editor isn’t ideal