Need help

What i’m trying to do is once you spawn in on my ttt server you spawn with a random weapon i’m also going to add customweapons but i need this to work 1st


local function OnPlayerSpawned( ply )
    local chance = math.random( 1, 10000 );

    if( chance <= 20 && chance >= 1 ) then
        print( string.format( "debug: %i
", chance ) );
        ply:Give( "weapon_ttt_knife" );
    end

    if( chance >= 50 && chance <= 100 ) then
        print( string.format( "debug: %i
", chance ) );
        ply:Give( "weapon_ttt_knife" );
    end

    if( chance >= 100 && chance <= 150 ) then
        print( string.format( "debug: %i
", chance ) );
        ply:Give( "weapon_ttt_knife" );
    end
end

hook.Add( "PlayerInitialSpawn", "random", OnPlayerSpawned );

also i have this file in addon on my server just for if i’m doing it wrong or something.
edit:I added a debug but it not showing any messages.