Need Help Coding A Custom Server Command For VIP Users

So on my server you can pay for VIP rank and if you are VIP you get certain items. Well, I have a script that makes admin’s, super admin’s, and vip’s physgun rainbow and cycle between colors. I want to make it so when a VIP only types in chat “!vipphysgun”, they can turn rainbow physgun on or off. Please help me make this!

If your script is serverside, you may want to use the hook GM:PlayerSay in order to detect the command. An example of its correct usage:

hook.Add( "PlayerSay", "MyCommand", function( ply, text, team )
	if ( string.sub( text, 1, 8 ) == "!command" ) then -- if characters 1 thru to 8 are "!command" then
                enableRainbowForPlayer(ply) -- Do your thing here
		return false -- Prevents the message from displaying in the chat.
        -- Don't return anything if we didn't find what we are looking for
end )

Alternatively, if your script is clientside, try using GM:OnPlayerChat instead of GM:PlayerSay

Ok so it’s serverside but how can I find the console command for it so it activates

[editline]16th September 2016[/editline]

or is that the full working code?

[editline]16th September 2016[/editline]

and where would I put that code?

watch at least half a lua tutorial before asking stupid questions like these, nobody knows anything about how your rainbow shit works so they can’t give you full source

nvm can someone just help me with this