Slaying and banning players

Hey, I wondered how I would ban and slay a player in a Client side file.
Heres my code.

For the slay code:

local SlayButtonOptions = DermaMenu() 
			for k,v in pairs(player.GetAll()) do
	
			
				SlayButtonOptions:AddOption(v:Nick(), function() MsgN("Still working")
				end)
			
			
			end
			SlayButtonOptions:Open() 
		end	

For the ban code:

local BanButtonOptions = DermaMenu() 
			for k,v in pairs(player.GetAll()) do
	
			
				BanButtonOptions:AddOption(v:Nick(), function() RunConsoleCommand("banid","0", v:SteamID()) end )
			
			
			end
			BanButtonOptions:Open() 
		end

Thanks!

You can’t ban or slay clientside, you’ll need to make a console command or use the net library.

Could you give an example?



concommand.Add( "slaypeople", function()
	--Magic goes here
end)