TTT Spawning with Weapons

How could I manage to make certain groups spawn with weapons, like make a donator spawn with a deagle.


local function giveWeapon(ply)
    if ply:CheckGroup("Donator") or ply:CheckGroup("owner") or ply:CheckGroup("superadmin") or ply:IsUserGroup("co-owner") then
        ply:Give("weapon_zm_revolver")
		ply:Give("weapon_ttt_ak47")
    end
end
 
hook.Add("PlayerLoadout", "giverankedWeapon", giveWeapon)

Doesn’t work.

Replace all of the CheckGroups with IsUserGroup.