function SWEP:PrimaryAttack() ent_trace = self.Owner:GetEyeTrace() ent_hit = ent_trace.Entity if( ent_hit:IsValid() and ent_hit:IsPlayer() ) then health = ent_hit:GetHealth() heal_max = ent_hit:GetMaxHealth() newhealth = health + 10 -- change value here if( newhealth > heal_max ) then ent_hit:SetHealth( heal_max ) else ent_hit:SetHealth( newhealth ) end end end