AddCSLuaFile()

SWEP.HoldType              = "ar2"

if CLIENT then
   SWEP.PrintName          = "Pretend Kebab"
   SWEP.Slot               = 2

   SWEP.ViewModelFlip      = false
   SWEP.ViewModelFOV       = 64

   SWEP.Icon               = "vgui/ttt/icon_m16"
   SWEP.IconLetter         = "w"
end

SWEP.Base                  = "weapon_tttbase"

SWEP.Kind                  = WEAPON_EQUIP
SWEP.WeaponID              = AMMO_KEBAB

SWEP.Primary.Delay         = 0.19
SWEP.Primary.Recoil        = 1.6
SWEP.Primary.Automatic     = true
SWEP.Primary.Ammo          = "none"
SWEP.Primary.Damage        = 23
SWEP.Primary.ClipSize       = -1
SWEP.Primary.DefaultClip    = -1

SWEP.AutoSpawnable         = false
SWEP.Spawnable             = false
SWEP.AmmoEnt               = "item_ammo_pistol_ttt"

SWEP.UseHands              = true
SWEP.ViewModel             = "models/weapons/c_medkit.mdl"
SWEP.WorldModel            = "models/weapons/w_medkit.mdl"

SWEP.IronSightsPos         = Vector(-7.58, -9.2, 0.55)
SWEP.IronSightsAng         = Vector(2.599, -1.3, -3.6)

-- Add some zoom to ironsights for this gun
function SWEP:PrimaryAttack()
	if ( CLIENT ) then return end
	local ent = self.Owner
	
	if (ent:Health() == ent:GetMaxHealth()) then return end
	
	
	self:SendWeaponAnim( ACT_VM_PRIMARYATTACK )
	ent:EmitSound( "HealthKit.Touch" )
	self:Remove()
	timer.Create( "sabirestorehealth" .. self:EntIndex(), 0.5, 50, function()
		if ( IsValid( ent )) then
			ent:SetHealth( math.Clamp( ent:Health() + 1, 0, 100 ))
		end 
	end )
end

function SWEP:SecondaryAttack()
	self:PrimaryAttack( true )
end
