Replace gun spawning

Is there a way I could put a script in to replace weapon_m4a1 with jb_m4a1. For example weapon_m4a1 would spawn on the map by default but could I make jb_m4a1 spawn there as well/instead?

local function AliasWeapon( new_name, actual_name )
  weapons.Register( weapons.Get( actual_name ), new_name, true )

hook.Add( "Initialize", "Replace Weapons", function( )
  AliasWeapon( "jb_m4a1", "weapon_m4a1" )
end )

Something like that, maybe, would do what you want ( even though OP is banned ). Didn’t test it, though.