
 // .AddFile( "sound/cry_close.wav" )
 // .AddFile( "sound/cry_error.wav" )
 // .AddFile( "sound/cry_hover.wav" )
 // .AddFile( "sound/cry_open.wav" )
 // .AddFile( "sound/cry_select.wav" )
 // .AddFile( "sound/weapons/crym4a1/m4a1_boltpull.wav" )
 // .AddFile( "sound/weapons/crym4a1/m4a1_boltrelease.wav" )
 // .AddFile( "sound/weapons/crym4a1/m4a1_clipin.wav" )
 // .AddFile( "sound/weapons/crym4a1/m4a1_clipout.wav" )
 // .AddFile( "sound/weapons/crym4a1/m4a1_silencer_click.wav" )
 // .AddFile( "sound/weapons/crym4a1/m4a1_silencer_release.wav" )
 // .AddFile( "sound/weapons/crym4a1/m4a1_silencer_twist.wav" )
 // .AddFile( "sound/weapons/crym4a1/m4a1_unsil-1.wav" )
 // .AddFile( "sound/weapons/crym4a1/m4a1_unsil-2.wav" )
 // .AddFile( "sound/weapons/crym4a1/m4a1_unsil-3.wav" )
 // .AddFile( "sound/weapons/crym4a1/m4a1_unsil-4.wav" )
 // .AddFile( "sound/weapons/crym4a1/m4a1_unsil-5.wav" )
 // .AddFile( "sound/suit/armor.mp3" )
 // .AddFile( "sound/suit/ArmorMode.wav" )
 // .AddFile( "sound/suit/Binocular.wav" )
 // .AddFile( "sound/suit/Binocularzoom.wav" )
 // .AddFile( "sound/suit/Binocularzoomout.wav" )
 // .AddFile( "sound/suit/cloak.mp3" )
 // .AddFile( "sound/suit/CloakMode.wav" )
 // .AddFile( "sound/suit/NightV.wav" )
 // .AddFile( "sound/suit/Nightvision_Off.wav" )
 // .AddFile( "sound/suit/Nightvision_On.wav" )
 // .AddFile( "sound/suit/speed.mp3" )
 // .AddFile( "sound/suit/SpeedMode.wav" )
 // .AddFile( "sound/suit/SpeedModeStop.wav" )
 // .AddFile( "sound/suit/StrenghtJump.wav" )
 // .AddFile( "sound/suit/StrenghtMode.wav" )
 // .AddFile( "sound/suit/strength.mp3" )
 // .AddFile( "sound/suit/SuitMedical.wav" )
 // .AddFile( "sound/suit/UnderWater.wav" )
 // .AddFile( "sound/interface_suit/Binocular Zoom In.wav" )
 // .AddFile( "sound/interface_suit/Binocular Zoom Out.wav" )
 // .AddFile( "sound/interface_suit/Modification Menu Appear.wav" )
 // .AddFile( "sound/interface_suit/Modification Menu Dissapear.wav" )
 // .AddFile( "sound/interface_suit/Nightvision Ambience.wav" )
 // .AddFile( "sound/interface_suit/Nightvision Off.wav" )
 // .AddFile( "sound/interface_suit/Nightvision On.wav" )
 // .AddFile( "sound/interface_suit/Suit Armor 108.wav" )
 // .AddFile( "sound/interface_suit/Suit Cloak Chameleon 101 R.wav" )
 // .AddFile( "sound/interface_suit/Suit Speed Activate 07 Good.wav" )
 // .AddFile( "sound/interface_suit/Suit Strength 101 R.wav" )
 // .AddFile( "models/weapons/v_cry_m4a1.mdl" )
 // .AddFile( "materials/crysis_arrow.vmt" )
 // .AddFile( "materials/crysis_arrow.vtf" )
 // .AddFile( "materials/crysis_button.vmt" )
 // .AddFile( "materials/crysis_button.vtf" )
 // .AddFile( "materials/crysis_circle.vmt" )
 // .AddFile( "materials/crysis_circle.vtf" )
 // .AddFile( "materials/grymod.vmt" )
 // .AddFile( "materials/grymod.vtf" )
 // .AddFile( "materials/models/weapons/v_models/cry_scar/assault_scope.vmt" )
 // .AddFile( "materials/models/weapons/v_models/cry_scar/assault_scope.vtf" )
 // .AddFile( "materials/models/weapons/v_models/cry_scar/assault_scope_exp.vtf" )
 // .AddFile( "materials/models/weapons/v_models/cry_scar/assault_scope_normal.vtf" )
 // .AddFile( "materials/models/weapons/v_models/cry_scar/back_rail.vmt" )
 // .AddFile( "materials/models/weapons/v_models/cry_scar/back_rail.vtf" )
 // .AddFile( "materials/models/weapons/v_models/cry_scar/back_rail_exp.vtf" )
 // .AddFile( "materials/models/weapons/v_models/cry_scar/back_rail_normal.vtf" )
 // .AddFile( "materials/models/weapons/v_models/cry_scar/crosshair.vmt" )
 // .AddFile( "materials/models/weapons/v_models/cry_scar/crosshair.vtf" )
 // .AddFile( "materials/models/weapons/v_models/cry_scar/LAM_rifle.vmt" )
 // .AddFile( "materials/models/weapons/v_models/cry_scar/LAM_rifle.vtf" )
 // .AddFile( "materials/models/weapons/v_models/cry_scar/LAM_rifle_exp.vtf" )
 // .AddFile( "materials/models/weapons/v_models/cry_scar/LAM_rifle_normal.vtf" )
 // .AddFile( "materials/models/weapons/v_models/cry_scar/laser_beam.vmt" )
 // .AddFile( "materials/models/weapons/v_models/cry_scar/laser_beam.vtf" )
 // .AddFile( "materials/models/weapons/v_models/cry_scar/lense.vmt" )
 // .AddFile( "materials/models/weapons/v_models/cry_scar/lense.vtf" )
 // .AddFile( "materials/models/weapons/v_models/cry_scar/mag.vmt" )
 // .AddFile( "materials/models/weapons/v_models/cry_scar/mag.vtf" )
 // .AddFile( "materials/models/weapons/v_models/cry_scar/mag_bump.vtf" )
 // .AddFile( "materials/models/weapons/v_models/cry_scar/railing.vmt" )
 // .AddFile( "materials/models/weapons/v_models/cry_scar/railing.vtf" )
 // .AddFile( "materials/models/weapons/v_models/cry_scar/railing_exp.vtf" )
 // .AddFile( "materials/models/weapons/v_models/cry_scar/railing_normal.vtf" )
 // .AddFile( "materials/models/weapons/v_models/cry_scar/scar.vmt" )
 // .AddFile( "materials/models/weapons/v_models/cry_scar/scar.vtf" )
 // .AddFile( "materials/models/weapons/v_models/cry_scar/scar_exp.vtf" )
 // .AddFile( "materials/models/weapons/v_models/cry_scar/scar_normal.vtf" )
 // .AddFile( "materials/models/weapons/v_models/cry_scar/silencer.vmt" )
 // .AddFile( "materials/models/weapons/v_models/cry_scar/silencer.vtf" )
 // .AddFile( "materials/models/weapons/v_models/cry_scar/silencer_exp.vtf" )
 // .AddFile( "materials/models/weapons/v_models/cry_scar/silencer_normal.vtf" )
 // .AddFile( "materials/cryhud/base.vmt" )
 // .AddFile( "materials/cryhud/base.vtf" )
 // .AddFile( "materials/cryhud/cadre.vmt" )
 // .AddFile( "materials/cryhud/cadre.vtf" )
 // .AddFile( "materials/cryhud/compass.vmt" )
 // .AddFile( "materials/cryhud/compass.vtf" )
 // .AddFile( "materials/cryhud/crash.vmt" )
 // .AddFile( "materials/cryhud/crash.vtf" )
 // .AddFile( "materials/cryhud/energy.vmt" )
 // .AddFile( "materials/cryhud/energy.vtf" )
 // .AddFile( "materials/cryhud/enr.vmt" )
 // .AddFile( "materials/cryhud/enr.vtf" )
 // .AddFile( "materials/cryhud/fcross.vmt" )
 // .AddFile( "materials/cryhud/fcross.vtf" )
 // .AddFile( "materials/cryhud/health.vmt" )
 // .AddFile( "materials/cryhud/health.vtf" )
 // .AddFile( "materials/cryhud/healthpr.vmt" )
 // .AddFile( "materials/cryhud/healthpr.vtf" )
 // .AddFile( "materials/cloak/organic.vmt" )
 // .AddFile( "materials/cloak/organic.vtf" )
 // .AddFile( "materials/cloak/organic_ddn.vtf" )
 // .AddFile( "materials/cloak/organic_ddndif.vtf" )




































































































































Regen_Status = true
Regen_HealRamps = true
Regen_PerSect = false 
local function Regen_PlayerHasSpawneda(ply)
ply.RD = CurTime() + 0.1
ply.HRA = 1
ply.HRT = 0
end
hook.Add("PlayerSpawn", "Player spawns AR", Regen_PlayerHasSpawneda)
local function Regen_PlayerTakesDamagea(ent, inflictor, attacker, _, dmginfo)
if (!ent:IsPlayer()) then return end
ent.RD = CurTime() + (ent.RD * 0 + 5) // ent.RD * 0 + (CurTime() + 5)
ent.HRA = 1
ent.HRT = 0
end
hook.Add("EntityTakeDamage", "Regen Time Penalty After Damage", Regen_PlayerTakesDamagea)
local function Regen_Doa()
for _, ply in pairs (player.GetAll()) do
if ply:Alive() then
if ply:GetNWBool("Armor", true) == true then
if Regen_PerSect == true then
local block
if ply:Armor() > 100 * 0.75 then
block = 100
elseif ply:Armor() > 100 * 0.5 then
block = 100 * 0.75
elseif ply:Armor() > 25 then
block = 100 * 0.5
else
block = 25
end

if Regen_HealRamps == true then
if CurTime() >= ply.RD then
if (ply:Armor() + ply.HRA) > block then
ply:SetArmor(block)
else
ply:SetArmor(math.min(ply:Armor() + ply.HRA, block))
ply.RD = CurTime() + 0.1
ply.HRT = ply.HRT + 1
end
end
if ply.HRT >= 3 then
ply.HRA = ply.HRA + 1
ply.HRT = 0
end
else
if CurTime() >= ply.RD then
ply:SetArmor(math.min(ply:Armor() + 1, block))
ply.RD = CurTime() + 0.1
end
end
else
if Regen_HealRamps == true then
if ply:Armor() < 100 then
if CurTime() >= ply.RD then
if (ply:Armor() + ply.HRA) > 100 then
ply:SetArmor(100)
else
ply:SetArmor(ply:Armor() + ply.HRA)
ply.RD = CurTime() + 0.1
ply.HRT = ply.HRT + 1
end
end
end
if ply.HRT >= 3  then
ply.HRA = ply.HRA + 1
ply.HRT = 0
end
else
if ply:Armor() < 100 then
if CurTime() >= ply.RD then
ply:SetArmor(ply:Armor() + 1)
ply.RD = CurTime() + 0.1
end
end
end
end
end
end
end
end
hook.Add("Tick", "Player gets his Armor regenerated", Regen_Doa)
local function Regen_PlayerHasSpawned(ply)
ply.RD = CurTime() + 0.1
ply.HRA = 1
ply.HRT = 0
end
hook.Add("PlayerSpawn", "Player spawnadads AR", Regen_PlayerHasSpawned)
local function Regen_PlayerTakesDamage(ent, inflictor, attacker, _, dmginfo)
if (!ent:IsPlayer()) then return end
ent.RD = CurTime() + (ent.RD * 0 + 5) // ent.RD * 0 + (CurTime() + 5)
ent.HRA = 1
ent.HRT = 0
end
hook.Add("EntityTakeDamage", "Regen Time Penalty After Daadadamage", Regen_PlayerTakesDamage)
local function Regen_Do()
for _, ply in pairs (player.GetAll()) do
if ply:Alive() then
if Regen_Status == true then
if Regen_PerSect == true then
local block
if ply:Health() > 100 * 0.75 then
block = 100
elseif ply:Health() > 100 * 0.5 then
block = 100 * 0.75
elseif ply:Health() > 25 then
block = 100 * 0.5
else
block = 25
end

if Regen_HealRamps == true then
if CurTime() >= ply.RD then
if (ply:Health() + ply.HRA) > block then
ply:SetHealth(block)
else
ply:SetHealth(math.min(ply:Health() + ply.HRA, block))
ply.RD = CurTime() + 0.1
ply.HRT = ply.HRT + 1
end
end
if ply.HRT >= 3 then
ply.HRA = ply.HRA + 1
ply.HRT = 0
end
else
if CurTime() >= ply.RD then
ply:SetHealth(math.min(ply:Health() + 1, block))
ply.RD = CurTime() + 0.1
end
end
else
if Regen_HealRamps == true then
if ply:Health() < 100 then
if CurTime() >= ply.RD then
if (ply:Health() + ply.HRA) > 100 then
ply:SetHealth(100)
else
ply:SetHealth(ply:Health() + ply.HRA)
ply.RD = CurTime() + 0.1
ply.HRT = ply.HRT + 1
end
end
end
if ply.HRT >= 3  then
ply.HRA = ply.HRA + 1
ply.HRT = 0
end
else
if ply:Health() < 100 then
if CurTime() >= ply.RD then
ply:SetHealth(ply:Health() + 1)
ply.RD = CurTime() + 0.1
end
end
end
end
end
end
end
end
hook.Add("Tick", "Player gets his health regeneratedadazda", Regen_Do)

