Restrict Console Command, or restrict Dframe to ULX rank

So here is the code



concommand.Add( "1server_1", function( ply, cmd, args )
local SMSG = vgui.Create( "DFrame" )
SMSG:SetTitle( "Post a server announcement!" )
SMSG:SetSize( 400, 200 )
SMSG:Center()
SMSG:MakePopup()

local SERVERNAME = vgui.Create( "DTextEntry", SMSG ) 
SERVERNAME:SetPos( 14, 45 )
SERVERNAME:SetSize( 372, 28 )
SERVERNAME:SetText( "Type out server name here! Nothing Else!" )
SERVERNAME.OnEnter = function()
SERVERNAME:SetEditable ( false )

end

local MESSAG = vgui.Create( "DTextEntry", SMSG ) 
MESSAG:SetPos( 14, 90 )
MESSAG:SetSize( 372, 28 )
MESSAG:SetText( "Type out a server message here!" )
MESSAG.OnEnter = function( self )
	chat.AddText( tgccolor, SERVERNAME:GetValue(), whitecolor, self:GetValue() )
end

local EXITB = vgui.Create( "DButton", SMSG ) 
EXITB:SetText( "Remove the whole thing just incase." )					
EXITB:SetPos( 64, 160 )					
EXITB:SetSize( 276, 31 )					
EXITB.DoClick = function()				
	SMSG:Remove()
end
	end)


Im wanting it to be ONLY a certain ulx group(s). Or restrict it to certain ranks.
Im not sure how to do this. Any help?
p.s if its something simple, I havnt slept since 5 in the afternoon its 6am rn. So sorry for my drousy self

[editline]22nd July 2017[/editline]

Nvm, I figured it out.