Making /it command

Soo… Im making it command for my darkrp server like in SAMP, where you say your me command and then type /it so check if it worked or not like it writes colored text, red for [FAILED] and green for [SUCCESS]

This is the code, will it work?

local emote = "** " -- Keeps people from faking outcome with /me command.

local function ItRandom( ply, args )
	local DoSay = function( text )
		local it = math.random( 0, 1 )
		local color =  if math.random=0 then MsgC( Color( 255, 0, 0 ), "[fail]" ) elseif math.random=1 MsgC( Color( 0, 255, 0 ), "[success]" ) end,
		DarkRP.talkToRange( ply, emote .. ply:Nick() .. " did something " .. color .. ".", 350 )
	return args, DoSay
DarkRP.defineChatCommand( "it", ItRandom )

How about testing it?

No time to do it :buckteeth: Professionals need to say, will it work or not.

We’re not here to spoon feed you. Test it out yourself.