give item to player depending on his scoreboard

I have this code in my gamemode :

/*---------------------------------------------------------
   Weapons & playermodels system when you start the game by phpmysql
---------------------------------------------------------*/

function GM:PlayerSpawn(ply)
  self.BaseClass:PlayerSpawn(ply)
  if ply:Team() == TEAM_BLUE then
    ply:SetModel("models/player/barney.mdl") -- BLUE DEFAULT PLAYERMODEL eg:  models/player/alien.mdl
    ply:SetHealth(100) -- -- DEFAULT  HEALTH,RUNSPEED AND WALKSPEED BLUE TEAM
    ply:SetRunSpeed(700) 
    ply:SetWalkSpeed(400)
    ply:Give("weapon_crowbar") --- WEAPONS FOR THE TEAM BLUE
    
  else
    ply:SetModel("models/player/police.mdl") -- RED DEFAULT PLAYERMODEL eg:  models/player/predator.mdl
    ply:SetHealth(100) -- -- DEFAULT  HEALTH,RUNSPEED AND WALKSPEED RED TEAM
    ply:SetRunSpeed(700) 
    ply:SetWalkSpeed(400)
    ply:Give("weapon_crowbar") -- WEAPONS FOR THE TEAM RED 
  end
end

Is possible to do this ? (if players got 8 points on scoreboard give to him another item)

**if scoreboard_points == “8”{
ply:Give(“weapon_pistol”) – UPGRADE DUE TO MORE POINTS IN SCOREBOARD
} **

For example :

/*---------------------------------------------------------
   Weapons & playermodels system when you start the game by phpmysql
---------------------------------------------------------*/

function GM:PlayerSpawn(ply)
  self.BaseClass:PlayerSpawn(ply)
  if ply:Team() == TEAM_BLUE then
    ply:SetModel("models/player/barney.mdl") -- BLUE DEFAULT PLAYERMODEL eg:  models/player/alien.mdl
    ply:SetHealth(100) -- -- DEFAULT  HEALTH,RUNSPEED AND WALKSPEED BLUE TEAM
    ply:SetRunSpeed(700) 
    ply:SetWalkSpeed(400)
    ply:Give("weapon_crowbar") --- WEAPONS FOR THE TEAM BLUE
   if scoreboard_points == "8"{
   ply:Give("weapon_pistol")   -- UPGRADE DUE TO MORE POINTS IN SCOREBOARD
   } 
    
  else
    ply:SetModel("models/player/police.mdl") -- RED DEFAULT PLAYERMODEL eg:  models/player/predator.mdl
    ply:SetHealth(100) -- -- DEFAULT  HEALTH,RUNSPEED AND WALKSPEED RED TEAM
    ply:SetRunSpeed(700) 
    ply:SetWalkSpeed(400)
    ply:Give("weapon_crowbar") -- WEAPONS FOR THE TEAM RED 
   if scoreboard_points == "8"{
   ply:Give("weapon_pistol")     -- UPGRADE DUE TO MORE POINTS IN SCOREBOARD
   } 
  end
end

Is this sort of what you want?

[lua]
if ( ply:Frags() == 8 ) then
ply:Give(“weapon_pistol”)
end
[/lua]

yeah it is, thanks. now i can make a css gamemode with classes upgrade

Edit:

This is the code that i am using :

    if ( ply:Frags() == 5 ) then 
    ply:Give("weapon_mad_p228") 
    ply:Give("weapon_mad_grenade")
    ply:Give("weapon_mad_flash")
    end
    if ( ply:Frags() == 10 ) then 
    ply:Give("weapon_mad_xm1014")
    ply:Give("weapon_mad_ump")
    end 
    if ( ply:Frags() == 15 ) then
    ply:Give("weapon_mad_m4a1")
    ply:Give("weapon_mad_awp")
    end

any way to put something like if ply:Frags is between 5 and 10?

if ply:Frags > 5 and ply:Frags < 10 then