actor Scopelight : PowerupGiver
{
  spawnid 255
  inventory.pickupmessage "Light Amplification Visor"
  inventory.maxamount 0
  powerup.duration 9000
  powerup.type "LightAmp"
  Inventory.PickUpSound "misc/light_PickUp"
  +COUNTITEM
  +INVENTORY.AUTOACTIVATE
  +INVENTORY.ALWAYSPICKUP
  states
  {
  Spawn:
    PVIS A 6
    PVIS B 6 bright
    loop
  }
}

Actor Butt : Inventory
{
Inventory.Maxamount 1
}

ACTOR MP40Ammo2 : Ammo
{
   Inventory.Amount 0
   Inventory.MaxAmount 21
   Ammo.BackpackAmount 0
   Ammo.BackpackMaxAmount 21
   Inventory.Icon "SIFLA0"
   
}

// --------------------------------------------------------------------------
//
// Heavy Rifle
//
// --------------------------------------------------------------------------
ACTOR HeavyRifle : Weapon
{
	Weapon.BobRangeX 0.5
	Weapon.BobRangeY 0.7
	Weapon.BobStyle InverseSmooth
	Weapon.BobSpeed 2.5
	Weapon.AmmoUse1 0
	Weapon.AmmoGive1 0
	Weapon.AmmoType1 "Clip2"
	Weapon.AmmoUse2 0
	Weapon.AmmoGive2 10
	Weapon.AmmoType2 "MP40Ammo2"
	Obituary "%o was shot down by %k's Heavy Rifle."
    AttackSound "None"
    Inventory.PickupSound "ZREADY"
	Weapon.UpSound "weapons/weaponholster"
	Inventory.Pickupmessage "You got the Heavy Rifle!"
    +WEAPON.NOAUTOAIM
    +WEAPON.NOALERT
	+WEAPON.NOAUTOFIRE
	+WEAPON.NO_AUTO_SWITCH
	Weapon.SelectionOrder 5500
    Scale 1.0
	States
	{
	
	Steady:
	TNT1 A 1
	Goto Ready
	
	Ready:
	TNT1 A 0 A_TakeInventory("PowerLightAmp", 1)
	TNT1 A 0 A_JumpIfInventory("SkipFailed",1,"Skipgun2")
        TNT1 A 1
        TNT1 A 0 A_PlaySound("ZREADY",5)
        RI3S A 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
		TNT1 A 0 A_SetPitch(pitch - 0.2)
		RI3S B 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
		TNT1 A 0 A_SetPitch(pitch - 0.4)
		RI3S C 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
		TNT1 A 0 A_SetPitch(pitch - 0.2)
		Goto RealReady
		
		RealReady:
		     TNT1 A 0 A_JumpIfInventory("Kicking",1,"DoKick")
        TNT1 A 0 A_JumpIfInventory("Taunting",1,"Taunt")
        TNT1 A 0 A_JumpIfInventory("Reloading",1,"Reload")
		TNT1 A 0 A_JumpIfInventory("Salute1", 1, "Salute")
		TNT1 A 0 A_JumpIfInventory("Salute2", 1, "Salute")
		TNT1 A 0 A_JumpIfInventory("Weaponspecial2",1,"Switchingpistol")
		TNT1 A 0 A_JumpIfInventory("switchfiremode",1,"Scopelight2")
		TNT1 A 0 A_JumpIfInventory("Unloading",1,"Unload")
		TNT1 A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
		RI3G A 1 A_WeaponReady
			Goto RealReady
		
		
				SwitchingPistol:
			TNT1 A 0 A_TakeInventory("weaponspecial2",1)
				TNT1 A 0 A_PlaySound("PIHOL", 4)
		RI3S C 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
		TNT1 A 0 A_SetPitch(pitch + 0.2)
		RI3S B 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
		TNT1 A 0 A_SetPitch(pitch + 0.4)
		RI3S A 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
		TNT1 A 0 A_SetPitch(pitch + 0.2)
			TNT1 A 0 A_JumpIfInventory("PowerStrength",1,"SwitchingPistol1B")
		TNT1 A 0 A_TakeInventory("weaponspecial2",1)
		TNT1 A 0 A_TakeInventory("PSeq2", 1)
		TNT1 A 0 A_TakeInventory("PSeq1", 2)
		TNT1 A 0 A_Recoil(-1)
		PUN4 A 1 A_WeaponReady(WRF_NoFire|WRF_NoSwitch)
		TNT1 A 0 A_PlaySound("weapons/fistwhoosh",0)
		PUN4 B 1 A_WeaponReady(WRF_NoFire|WRF_NoSwitch)
		TNT1 A 0 A_SetPitch(+2 + pitch)
		TNT1 A 0 A_FireCustomMissile("ShakeYourAss",0,0,0,0)
		PUN4 D 1 A_WeaponReady(WRF_NoFire|WRF_NoSwitch)
			TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
		RIfF AA 0 A_FireCustomMissile("MeleeStrike1", 0, 0, 0, 5)
		RIfF A 0 A_FireCustomMissile("MeleeStrike1", 0, 0, 25, 5)
		RIfF A 0 A_FireCustomMissile("MeleeStrike1", 0, 0, -25, 5)
		TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
		TNT1 A 0 A_SetPitch(+3 + pitch)
		PUN4 EGH 1 A_WeaponReady(WRF_NoFire|WRF_NoSwitch)
		PUN4 I 1 A_SetPitch(-2 + pitch)
		TNT1 A 0 A_SetPitch(-3 + pitch)
		PUN4 JKL 1 A_WeaponReady(WRF_NoFire|WRF_NoSwitch)
		TNT1 A 5
			TNT1 A 0 A_JumpIfInventory("weaponspecial2", 1, "SwitchingPistol2")
			TNT1 A 0 A_JumpIfInventory("weaponspecial2", 1, "SwitchingPistol2")
				TNT1 A 0 A_JumpIfInventory("weaponspecial2", 1, "SwitchingPistol2")
					TNT1 A 0 A_JumpIfInventory("weaponspecial2", 1, "SwitchingPistol2")
						TNT1 A 0 A_JumpIfInventory("weaponspecial2", 1, "SwitchingPistol2")
							TNT1 A 0 A_JumpIfInventory("weaponspecial2", 1, "SwitchingPistol2")
		TNT1 A 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
		TNT1 A 0 A_TakeInventory("weaponspecial2",1)
		Goto Ready
		
		
		SwitchingPistol2:
		TNT1 A 0 A_JumpIfInventory("PowerStrength",1,"SwitchingPistol2B")
		TNT1 A 0 A_TakeInventory("weaponspecial2",1)
				TNT1 A 0 A_PlaySound("PIHOL", 4)
		TNT1 A 0 A_TakeInventory("PSeq2", 1)
		TNT1 A 0 A_TakeInventory("PSeq1", 2)
		TNT1 A 0 A_Recoil(-1)
	PUN3 A 1 A_WeaponReady(WRF_NoFire|WRF_NoSwitch)
		TNT1 A 0 A_PlaySound("weapons/fistwhoosh",0)
		PUN3 B 1 A_WeaponReady(WRF_NoFire|WRF_NoSwitch)
		TNT1 A 0 A_SetPitch(+2 + pitch)
		TNT1 A 0 A_FireCustomMissile("ShakeYourAss",0,0,0,0)
		PUN3 D 1 A_WeaponReady(WRF_NoFire|WRF_NoSwitch)
					TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
		RIfF AA 0 A_FireCustomMissile("MeleeStrike1", 0, 0, 0, 5)
		RIfF A 0 A_FireCustomMissile("MeleeStrike1", 0, 0, 25, 5)
		RIfF A 0 A_FireCustomMissile("MeleeStrike1", 0, 0, -25, 5)
		TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
		TNT1 A 0 A_SetPitch(+3 + pitch)
			TNT1 A 0 A_TakeInventory("weaponspecial2",1)
		PUN3 EGH 1 A_WeaponReady(WRF_NoFire|WRF_NoSwitch)
		PUN3 I 1 A_SetPitch(-2 + pitch)
		TNT1 A 0 A_SetPitch(-3 + pitch)
		PUN3 JKL 1 A_WeaponReady(WRF_NoFire|WRF_NoSwitch)
			TNT1 A 5
			TNT1 A 0 A_JumpIfInventory("weaponspecial2", 1, "SwitchingPistol3")
			TNT1 A 0 A_JumpIfInventory("weaponspecial2", 1, "SwitchingPistol3")
				TNT1 A 0 A_JumpIfInventory("weaponspecial2", 1, "SwitchingPistol3")
					TNT1 A 0 A_JumpIfInventory("weaponspecial2", 1, "SwitchingPistol3")
						TNT1 A 0 A_JumpIfInventory("weaponspecial2", 1, "SwitchingPistol3")
							TNT1 A 0 A_JumpIfInventory("weaponspecial2", 1, "SwitchingPistol3")
		TNT1 A 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
		TNT1 A 0 A_TakeInventory("weaponspecial2",1)
		Goto Ready
		
		
			SwitchingPistol3:
			TNT1 A 0 A_JumpIfInventory("PowerStrength",1,"SwitchingPistol3B")
		TNT1 A 0 A_TakeInventory("weaponspecial2",1)
		TNT1 A 0 A_TakeInventory("PSeq2", 1)
		TNT1 A 0 A_TakeInventory("PSeq1", 2)
		TNT1 A 0 A_Recoil(-1)
		PUN4 A 1 A_WeaponReady(WRF_NoFire|WRF_NoSwitch)
		TNT1 A 0 A_PlaySound("weapons/fistwhoosh",0)
		PUN4 B 1 A_WeaponReady(WRF_NoFire|WRF_NoSwitch)
		TNT1 A 0 A_SetPitch(+2 + pitch)
		TNT1 A 0 A_FireCustomMissile("ShakeYourAss",0,0,0,0)
		PUN4 D 1 A_WeaponReady(WRF_NoFire|WRF_NoSwitch)
			TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
		RIfF AA 0 A_FireCustomMissile("MeleeStrike1", 0, 0, 0, 5)
		RIfF A 0 A_FireCustomMissile("MeleeStrike1", 0, 0, 25, 5)
		RIfF A 0 A_FireCustomMissile("MeleeStrike1", 0, 0, -25, 5)
		TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
		TNT1 A 0 A_SetPitch(+3 + pitch)
				TNT1 A 0 A_TakeInventory("weaponspecial2",1)
		PUN4 EGH 1 A_WeaponReady(WRF_NoFire|WRF_NoSwitch)
		PUN4 I 1 A_SetPitch(-2 + pitch)
		TNT1 A 0 A_SetPitch(-3 + pitch)
		PUN4 JKL 1 A_WeaponReady(WRF_NoFire|WRF_NoSwitch)
		TNT1 A 5
			TNT1 A 0 A_JumpIfInventory("weaponspecial2", 1, "SwitchingPistol2")
			TNT1 A 0 A_JumpIfInventory("weaponspecial2", 1, "SwitchingPistol2")
				TNT1 A 0 A_JumpIfInventory("weaponspecial2", 1, "SwitchingPistol2")
					TNT1 A 0 A_JumpIfInventory("weaponspecial2", 1, "SwitchingPistol2")
						TNT1 A 0 A_JumpIfInventory("weaponspecial2", 1, "SwitchingPistol2")
							TNT1 A 0 A_JumpIfInventory("weaponspecial2", 1, "SwitchingPistol2")
		TNT1 A 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
		TNT1 A 0 A_TakeInventory("weaponspecial2",1)
		Goto Ready
		
		
		SwitchingPistol1B:
			TNT1 A 0 A_TakeInventory("weaponspecial2",1)
				TNT1 A 0 A_PlaySound("PIHOL", 4)
		TNT1 A 0 A_TakeInventory("weaponspecial2",1)
		TNT1 A 0 A_TakeInventory("PSeq2", 1)
		TNT1 A 0 A_TakeInventory("PSeq1", 2)
		TNT1 A 0 A_Recoil(-1)
		PUN4 A 1 A_WeaponReady(WRF_NoFire|WRF_NoSwitch)
		TNT1 A 0 A_PlaySound("weapons/fistwhoosh",0)
		PUN4 B 1 A_WeaponReady(WRF_NoFire|WRF_NoSwitch)
		TNT1 A 0 A_SetPitch(+2 + pitch)
		TNT1 A 0 A_FireCustomMissile("ShakeYourAss",0,0,0,0)
		PUN4 D 1 A_WeaponReady(WRF_NoFire|WRF_NoSwitch)
			TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
		RIfF AA 0 A_FireCustomMissile("MeleeStrike1Smash", 0, 0, 0, 5)
		RIfF A 0 A_FireCustomMissile("MeleeStrike1Smash", 0, 0, 25, 5)
		RIfF A 0 A_FireCustomMissile("MeleeStrike1Smash", 0, 0, -25, 5)
		TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
		TNT1 A 0 A_SetPitch(+3 + pitch)
					TNT1 A 0 A_TakeInventory("weaponspecial2",1)
		PUN4 EGH 1 A_WeaponReady(WRF_NoFire|WRF_NoSwitch)
		PUN4 I 1 A_SetPitch(-2 + pitch)
		TNT1 A 0 A_SetPitch(-3 + pitch)
		PUN4 JKL 1 A_WeaponReady(WRF_NoFire|WRF_NoSwitch)
		TNT1 A 5
			TNT1 A 0 A_JumpIfInventory("weaponspecial2", 1, "SwitchingPistol2")
			TNT1 A 0 A_JumpIfInventory("weaponspecial2", 1, "SwitchingPistol2")
				TNT1 A 0 A_JumpIfInventory("weaponspecial2", 1, "SwitchingPistol2")
					TNT1 A 0 A_JumpIfInventory("weaponspecial2", 1, "SwitchingPistol2")
						TNT1 A 0 A_JumpIfInventory("weaponspecial2", 1, "SwitchingPistol2")
							TNT1 A 0 A_JumpIfInventory("weaponspecial2", 1, "SwitchingPistol2")
		TNT1 A 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
		TNT1 A 0 A_TakeInventory("weaponspecial2",1)
		Goto Ready
		
		
		SwitchingPistol2B:
		TNT1 A 0 A_TakeInventory("weaponspecial2",1)
				TNT1 A 0 A_PlaySound("PIHOL", 4)
		TNT1 A 0 A_TakeInventory("PSeq2", 1)
		TNT1 A 0 A_TakeInventory("PSeq1", 2)
		TNT1 A 0 A_Recoil(-1)
	PUN3 A 1 A_WeaponReady(WRF_NoFire|WRF_NoSwitch)
		TNT1 A 0 A_PlaySound("weapons/fistwhoosh",0)
		PUN3 B 1 A_WeaponReady(WRF_NoFire|WRF_NoSwitch)
		TNT1 A 0 A_SetPitch(+2 + pitch)
		TNT1 A 0 A_FireCustomMissile("ShakeYourAss",0,0,0,0)
		PUN3 D 1 A_WeaponReady(WRF_NoFire|WRF_NoSwitch)
					TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
		RIfF AA 0 A_FireCustomMissile("MeleeStrike1Smash", 0, 0, 0, 5)
		RIfF A 0 A_FireCustomMissile("MeleeStrike1Smash", 0, 0, 25, 5)
		RIfF A 0 A_FireCustomMissile("MeleeStrike1Smash", 0, 0, -25, 5)
		TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
		TNT1 A 0 A_SetPitch(+3 + pitch)
				TNT1 A 0 A_TakeInventory("weaponspecial2",1)
		PUN3 EGH 1 A_WeaponReady(WRF_NoFire|WRF_NoSwitch)
		PUN3 I 1 A_SetPitch(-2 + pitch)
		TNT1 A 0 A_SetPitch(-3 + pitch)
		PUN3 JKL 1 A_WeaponReady(WRF_NoFire|WRF_NoSwitch)
					TNT1 A 5
			TNT1 A 0 A_JumpIfInventory("weaponspecial2", 1, "SwitchingPistol3")
			TNT1 A 0 A_JumpIfInventory("weaponspecial2", 1, "SwitchingPistol3")
				TNT1 A 0 A_JumpIfInventory("weaponspecial2", 1, "SwitchingPistol3")
					TNT1 A 0 A_JumpIfInventory("weaponspecial2", 1, "SwitchingPistol3")
						TNT1 A 0 A_JumpIfInventory("weaponspecial2", 1, "SwitchingPistol3")
							TNT1 A 0 A_JumpIfInventory("weaponspecial2", 1, "SwitchingPistol3")
		TNT1 A 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
		TNT1 A 0 A_TakeInventory("weaponspecial2",1)
		Goto Ready
		
		SwitchingPistol3B:
		TNT1 A 0 A_TakeInventory("weaponspecial2",1)
		TNT1 A 0 A_TakeInventory("PSeq2", 1)
		TNT1 A 0 A_TakeInventory("PSeq1", 2)
		TNT1 A 0 A_Recoil(-1)
		PUN4 A 1 A_WeaponReady(WRF_NoFire|WRF_NoSwitch)
		TNT1 A 0 A_PlaySound("weapons/fistwhoosh",0)
		PUN4 B 1 A_WeaponReady(WRF_NoFire|WRF_NoSwitch)
		TNT1 A 0 A_SetPitch(+2 + pitch)
		TNT1 A 0 A_FireCustomMissile("ShakeYourAss",0,0,0,0)
		PUN4 D 1 A_WeaponReady(WRF_NoFire|WRF_NoSwitch)
			TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
		RIfF AA 0 A_FireCustomMissile("MeleeStrike1Smash", 0, 0, 0, 5)
		RIfF A 0 A_FireCustomMissile("MeleeStrike1Smash", 0, 0, 25, 5)
		RIfF A 0 A_FireCustomMissile("MeleeStrike1Smash", 0, 0, -25, 5)
		TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
		TNT1 A 0 A_SetPitch(+3 + pitch)
				TNT1 A 0 A_TakeInventory("weaponspecial2",1)
		PUN4 EGH 1 A_WeaponReady(WRF_NoFire|WRF_NoSwitch)
		PUN4 I 1 A_SetPitch(-2 + pitch)
		TNT1 A 0 A_SetPitch(-3 + pitch)
		PUN4 JKL 1 A_WeaponReady(WRF_NoFire|WRF_NoSwitch)
		TNT1 A 5
			TNT1 A 0 A_JumpIfInventory("weaponspecial2", 1, "SwitchingPistol2")
			TNT1 A 0 A_JumpIfInventory("weaponspecial2", 1, "SwitchingPistol2")
				TNT1 A 0 A_JumpIfInventory("weaponspecial2", 1, "SwitchingPistol2")
					TNT1 A 0 A_JumpIfInventory("weaponspecial2", 1, "SwitchingPistol2")
						TNT1 A 0 A_JumpIfInventory("weaponspecial2", 1, "SwitchingPistol2")
							TNT1 A 0 A_JumpIfInventory("weaponspecial2", 1, "SwitchingPistol2")
		TNT1 A 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
		TNT1 A 0 A_TakeInventory("weaponspecial2",1)
		Goto Ready
		
		Scopelight2:
	TNT1 A 0 A_JumpIfInventory("Butt",1,"NoNightvision")	
	RI3Q A 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH) 
		TNT1 A 0 A_SetPitch(pitch + 0.2)
	RI3Q B 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
	TNT1 A 0 A_PlaySound("NON")
		RI3Q B 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH) 
		TNT1 A 0 A_SetPitch(pitch - 0.2)
	RI3Q A 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
	TNT1 A 0 A_Print("Nightvisionmode Activated")
	TNT1 A 0 A_TakeInventory("switchfiremode", 1)
	TNT1 A 0 A_GiveInventory("Butt")
	GoTo RealReady
	
	NoNightvision:
		RI3Q A 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH) 
		TNT1 A 0 A_SetPitch(pitch + 0.2)
	RI3Q B 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
	TNT1 A 0 A_PlaySound("NOFF")
	RI3Q B 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH) 
		TNT1 A 0 A_SetPitch(pitch - 0.2)
	RI3Q A 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
	TNT1 A 0 A_Print("Nightvisionmode deactivated")
	TNT1 A 0 A_TakeInventory("switchfiremode", 1)
	TNT1 A 0 A_TakeInventory("Butt", 1)
	GoTo RealReady		
		
	Lightfire:
		 TNT1 A 0
		TNT1 A 0 A_JumpIfInventory("Zoomed",1,"UnZoom")
		TNT1 A 0 A_Giveinventory("Zoomed",1)
		TNT1 A 0 A_Giveinventory("GoSpecial",1)
        TNT1 A 0 A_ZoomFactor(4.0)
		RI3F DC 1 A_playsound("ZOOM", 4)
		TNT1 A 0 A_Giveinventory("ADSmode",1)
		HKFZ A 1 A_SetBlend("Black",0.2,3)
		HKFZ A 1 A_SetBlend("Black",0.4,3)
		HKFZ A 1 A_SetBlend("Black",0.6,3)
		HKFZ A 1 A_SetBlend("Black",0.8,3)
        HKFZ AA 1 A_SetBlend("Black",1.0,3)
			TNT1 A 0 A_GiveInventory("Nightvision", 1)
        Goto Ready3
		
			Ready3:
		TNT1 A 0 A_GiveInventory("Scopelight", 1)
		TNT1 A 0 A_JumpIfInventory("Reloading",1,"Reload")
		SNIP A 9 A_WeaponReady
		TNT1 A 0 A_JumpIfInventory("Reloading",1,"Reload")
		SNIP A 9 A_WeaponReady
		TNT1 A 0 A_JumpIfInventory("Reloading",1,"Reload")
		SNIP A 9 A_WeaponReady
		Loop

		
		
		Ready2:
		TNT1 A 0 A_JumpIfInventory("Reloading",1,"Reload")
		SNIP A 9 A_WeaponReady
		TNT1 A 0 A_JumpIfInventory("Reloading",1,"Reload")
		SNIP A 9 A_WeaponReady
		TNT1 A 0 A_JumpIfInventory("Reloading",1,"Reload")
		SNIP A 9 A_WeaponReady
		Loop

	Deselect:
	TNT1 A 0 A_TakeInventory("PowerLightAmp", 1)
	TNT1 A 0 A_TakeInventory("Weaponspecial2")
		TNT1 A 0 A_TakeInventory("Weaponspecial")
		TNT1 A 0 A_TakeInventory("switchfiremode")
		TNT1 A 0 A_Takeinventory("Zoomed",1)
		TNT1 A 0 A_TakeInventory("TossGrenade", 1)
        TNT1 A 0 A_ZoomFactor(1.0)
		TNT1 A 0 A_Takeinventory("ADSmode",1) 
		TNT1 A 0 A_PlaySound("PIHOL", 6)
  		RI3S C 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
		TNT1 A 0 A_SetPitch(pitch + 0.2)
		RI3S B 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
		TNT1 A 0 A_SetPitch(pitch + 0.4)
		RI3S A 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
		TNT1 A 0 A_SetPitch(pitch + 0.2)
		TNT1 A 0 A_Lower
		Wait
	Select:
			     TNT1 A 0 A_JumpIfInventory("SkipFailed",1,"Skipgun2")
		TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("Heavy Rifle")==1,"Skipgun")
	    	TNT1 A 0 A_Takeinventory("FistsSelected",1)
	TNT1 A 0 A_Takeinventory("SawSelected",1)
	TNT1 A 0 A_Takeinventory("ShotgunSelected",1)
	TNT1 A 0 A_Takeinventory("SSGSelected",1)
	TNT1 A 0 A_Takeinventory("MinigunSelected",1)
	TNT1 A 0 A_Takeinventory("PlasmaGunSelected",1)
	TNT1 A 0 A_Takeinventory("RocketLauncherSelected",1)
    TNT1 A 0 A_Takeinventory("GrenadeLauncherSelected",1)
	TNT1 A 0 A_Takeinventory("BFGSelected",1)
	TNT1 A 0 A_Takeinventory("BFG10kSelected",1)
	TNT1 A 0 A_Takeinventory("RailGunSelected",1)
	TNT1 A 0 A_Takeinventory("SubMachineGunSelected",1)
	TNT1 A 0 A_Takeinventory("RevenantLauncherSelected",1)
	TNT1 A 0 A_Takeinventory("LostSoulSelected",1)
	TNT1 A 0 A_Takeinventory("FlameCannonSelected",1)
	TNT1 A 0 A_Takeinventory("HasBarrel",1)
	TNT1 A 0 A_TakeInventory("TossGrenade", 1)
		TNT1 A 0 A_Raise
		Wait
		
		Skipgun:
			TNT1 A 0 A_GiveInventory("SkipFailed", 1)
		TNT1 A 0 A_SelectWeapon("Mini_Gun")
		goto SkipComplete
		
		Skipgun2:
			TNT1 A 0 A_TakeInventory("SkipFailed", 1)
		TNT1 A 0 A_SelectWeapon("Rifle")
		goto SkipComplete2
		
		SkipComplete:
			TNT1 A 0 A_Lower
		Wait
		
		SkipComplete2:
			TNT1 A 0 A_Lower
		Wait
		
	
		
		
	
		
		
   Fire:
	    TNT1 A 0
                TNT1 A 0 A_JumpIfInventory("MP40Ammo2",1,2)
        Goto Reload
        TNT1 AAAA 0
			    TNT1 A 0 A_JumpIfInventory("Zoomed",1,"Fire2")
		TNT1 A 0 A_JumpIfInventory("AltMuzzle", 1, "FireA2")
		 TNT1 A 0 A_PlaySound("AR_Fire",6)
		 	 TNT1 A 0 A_PlaySound("HVYY",7)
			  TNT1 A 0 A_FireCustomMissile("ZTracer2", random(-1,1), 0, -1, -12, 0, random(-1,1))
		RI3G A 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
		TNT1 A 0 A_Takeinventory("MP40Ammo2",1)
		TNT1 A 0 A_FireCustomMissile("SmokeSpawnerSM",0,0,0,0)
				TNT1 A 0 A_FireCustomMissile("YellowFlareSpawn",0,0,0,0)
		TNT1 A 0 A_FireCustomMissile("YellowFlareSpawn",-5,0,0,0)
		RI3F A 1 BRIGHT A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
		TNT1 A 0 A_FireBullets (1.3, 1.3, -1, 28, "MachineGunBulletPuff")
		TNT1 A 0 Radius_Quake(1,2,0,1,0) //(intensity, duration, damrad, tremrad, tid)
		TNT1 A 0 A_FireCustomMissile("RifleCaseSpawn",5,0,3,-6)
			TNT1 A 0 A_FireCustomMissile("ShakeYourAss", 0, 0, 0, 0)
		TNT1 A 0 A_ZoomFactor(0.98)
		TNT1 A 0 A_AlertMonsters
			RI3F B 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
			TNT1 A 0 A_ZoomFactor(0.97)
		
		TNT1 A 0 A_SetPitch(-1.6 + pitch)
        //TNT1 A 0 ACS_Execute(278, 0, 0, 0, 0)
		RI3F C 1  A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
		TNT1 A 0 A_ZoomFactor(0.98)
	
		TNT1 A 0 A_SetPitch(+0.7 + pitch)
        RI3G A 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
		TNT1 A 0 A_ZoomFactor(0.99)
		  RI3G A 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
		TNT1 A 0 A_ZoomFactor(1.0)
		  RI3G A 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
		TNT1 A 0 A_SetPitch(+0.7 + pitch)
		TNT1 A 0 A_GiveInventory("AltMuzzle", 1)
		TNT1 A 0 A_Refire
		Goto RealReady
		
		FireA2:
	    TNT1 A 0
                TNT1 A 0 A_JumpIfInventory("MP40Ammo2",1,2)
        Goto Reload
        TNT1 AAAA 0
		   TNT1 A 0 A_JumpIfInventory("Zoomed",1,"Fire2")
		TNT1 A 0 A_Takeinventory("MP40Ammo2",1)
		 TNT1 A 0 A_PlaySound("AR_Fire",6)
		  TNT1 A 0 A_PlaySound("HVYY",7)
		TNT1 A 0 A_FireCustomMissile("SmokeSpawnerSM",0,0,0,0)
				TNT1 A 0 A_FireCustomMissile("YellowFlareSpawn",0,0,0,0)
		TNT1 A 0 A_FireCustomMissile("YellowFlareSpawn",-5,0,0,0)
		RI3F A 1 BRIGHT A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
		TNT1 A 0 A_FireBullets (1.2, 1.2, -1, 28, "HitPuff")
		TNT1 A 0 A_FireCustomMissile("ZTracer2", random(-1,1), 0, -1, -12, 0, random(-1,1))
		TNT1 A 0 Radius_Quake(1,2,0,1,0) //(intensity, duration, damrad, tremrad, tid)
		TNT1 A 0 A_FireCustomMissile("RifleCaseSpawn",5,0,3,-6)
			TNT1 A 0 A_FireCustomMissile("ShakeYourAss", 0, 0, 0, 0)
		TNT1 A 0 A_ZoomFactor(0.98)
		TNT1 A 0 A_AlertMonsters
			RI3F Z 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
			TNT1 A 0 A_ZoomFactor(0.97)
		
		TNT1 A 0 A_SetPitch(-1.6 + pitch)
        //TNT1 A 0 ACS_Execute(278, 0, 0, 0, 0)
		RI3F D 1  A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
		TNT1 A 0 A_ZoomFactor(0.98)
	
		TNT1 A 0 A_SetPitch(+0.7 + pitch)
        RI3G A 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
		TNT1 A 0 A_ZoomFactor(0.99)
		  RI3G A 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
		TNT1 A 0 A_ZoomFactor(1.0)
		  RI3G A 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
		TNT1 A 0 A_SetPitch(+0.7 + pitch)
		TNT1 A 0 A_TakeInventory("AltMuzzle", 1)
		TNT1 A 0 A_Refire
		Goto RealReady
		
		Fire2:
		 TNT1 A 0 A_JumpIfInventory("Nightvision",1,"Fire3")
	TNT1 A 0 A_JumpIfInventory("MP40Ammo2",1,2)
        Goto Reload
        TNT1 AAAA 0
        TNT1 A 0 A_PlaySound("AR_Fire",6)
		 TNT1 A 0 A_PlaySound("HVYY",7)
		TNT1 A 0 A_Takeinventory("MP40Ammo2",1)
		TNT1 A 0 A_FireCustomMissile("ShakeYourAssMinor", 0, 0, 0, 0)
		TNT1 A 0 A_FireCustomMissile("YellowFlareSpawn",-5,0,0,0)
		SNIP A 1 BRIGHT A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
		TNT1 A 0 A_AlertMonsters
		TNT1 A 0 A_FireBullets (1, 1, 0, 28, "MachineGunBulletPuff")
		TNT1 A 0 A_FireCustomMissile("RifleCaseSpawn",5,0,3,-6)
		TNT1 A 0 A_SetPitch(-1.1 + pitch)
		 TNT1 A 0 BRIGHT A_FireCustomMissile("ZTracer2", 0, 0, 0, 0)
		TNT1 A 0 A_FireCustomMissile("SmokeSpawner",0,0,0,5)
		SNIP A 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
			TNT1 A 0 A_SetPitch(+0.4 + pitch)
        //TNT1 A 0 ACS_Execute(278, 0, 0, 0, 0)
		SNIP A 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
		TNT1 A 0 A_FireCustomMissile("RifleCaseSpawn",5,0,6,-6)
	TNT1 A 0 A_SetPitch(+0.3 + pitch)
			 SNIP A 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
			 TNT1 A 0 A_SetPitch(+0.3 + pitch)
        SNIP A 2 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
		TNT1 A 0 A_Refire
		Goto Ready2
		
		Fire3:
	TNT1 A 0 A_JumpIfInventory("MP40Ammo2",1,2)
        Goto Reload
        TNT1 AAAA 0
        TNT1 A 0 A_PlaySound("AR_Fire",6)
		 TNT1 A 0 A_PlaySound("HVYY",7)
		TNT1 A 0 A_Takeinventory("MP40Ammo2",1)
		TNT1 A 0 A_FireCustomMissile("ShakeYourAssMinor", 0, 0, 0, 0)
		TNT1 A 0 A_FireCustomMissile("YellowFlareSpawn",-5,0,0,0)
		SNIP A 1 BRIGHT A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
		TNT1 A 0 A_AlertMonsters
		TNT1 A 0 A_FireBullets (1, 1, 0, 28, "MachineGunBulletPuff")
		TNT1 A 0 A_FireCustomMissile("RifleCaseSpawn",5,0,3,-6)
		TNT1 A 0 A_SetPitch(-1.1 + pitch)
		 TNT1 A 0 BRIGHT A_FireCustomMissile("ZTracer2", 0, 0, 0, 0)
		TNT1 A 0 A_FireCustomMissile("SmokeSpawner",0,0,0,5)
		SNIP A 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
			TNT1 A 0 A_SetPitch(+0.4 + pitch)
        //TNT1 A 0 ACS_Execute(278, 0, 0, 0, 0)
		SNIP A 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
		TNT1 A 0 A_FireCustomMissile("RifleCaseSpawn",5,0,6,-6)
	TNT1 A 0 A_SetPitch(+0.3 + pitch)
			 SNIP A 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
			 TNT1 A 0 A_SetPitch(+0.3 + pitch)
        SNIP A 2 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
		TNT1 A 0 A_Refire
		Goto Ready3
		
		AltFire:
        TNT1 A 0
		TNT1 A 0 A_JumpIfInventory("Butt",1, "Lightfire")
		TNT1 A 0 A_JumpIfInventory("Zoomed",1,"UnZoom")
		TNT1 A 0 A_Giveinventory("Zoomed",1)
		TNT1 A 0 A_Giveinventory("GoSpecial",1)
        TNT1 A 0 A_ZoomFactor(4.0)
		RI3F DC 1 A_playsound("ZOOOM", 4)
		TNT1 A 0 A_Giveinventory("ADSmode",1)
		HKFZ A 1 A_SetBlend("Black",0.2,3)
		HKFZ A 1 A_SetBlend("Black",0.4,3)
		HKFZ A 1 A_SetBlend("Black",0.6,3)
		HKFZ A 1 A_SetBlend("Black",0.8,3)
        HKFZ AA 1 A_SetBlend("Black",1.0,3)
        Goto Ready2
	UnZoom:
        TNT1 AAAAAA 0
		TNT1 A 0 A_playsound("OUT", 4)
		HKFZ A 1 A_SetBlend("Black",0.2,3)
		HKFZ A 1 A_SetBlend("Black",0.4,3)
		HKFZ A 1 A_SetBlend("Black",0.6,3)
		HKFZ A 1 A_SetBlend("Black",0.8,3)
        HKFZ AA 1 A_SetBlend("Black",1.0,3)
		TNT1 A 0 A_Takeinventory("Zoomed",1)
		TNT1 A 0 A_TakeInventory("PowerLightAmp", 1)
        TNT1 A 0 A_ZoomFactor(1.0)
		TNT1 A 0 A_Takeinventory("ADSmode",1)
        Goto RealReady
		
		NoAmmo:
	RI3G A 1 A_WeaponReady
	TNT1 A 0 A_PlaySound("weapons/empty")
	TNT1 A 0 A_Takeinventory("Zoomed",1)
    TNT1 A 0 A_ZoomFactor(1.0)
	TNT1 A 0 A_Takeinventory("ADSmode",1)
	Goto RealReady
		
		DontReload:
        TNT1 A 0 A_JumpIfInventory("Kicking",1,"DoKick")
        TNT1 A 0 A_JumpIfInventory("Taunting",1,"Taunt")
        TNT1 A 0 A_JumpIfInventory("Reloading",1,"Reload")
		TNT1 A 0 A_JumpIfInventory("Unloading",1,"Unload")
		TNT1 A 0 A_JumpIfInventory("Salute1", 1, "Salute")
		TNT1 A 0 A_JumpIfInventory("Salute2", 1, "Salute")
		
		RI3G A 1 A_WeaponReady
		TNT1 A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
		TNT1 A 0 A_TakeInventory("UsedStamina", 2)
		Loop

     Reload:
	 	TNT1 A 0 A_TakeInventory("PowerLightAmp", 1)
		RI3G A 1 A_WeaponReady(WRF_NOFIRE)
		TNT1 A 0 A_ZoomFactor(1.0)
		TNT1 A 0 A_Takeinventory("Reloading",1)
		TNT1 A 0 A_Takeinventory("ADSmode",1)
		TNT1 A 0 A_Takeinventory("Zoomed",1)
		TNT1 A 0 A_JumpIfInventory("MP40Ammo2",21,"DontReload")
		TNT1 A 0 A_JumpIfInventory("MP40Ammo2", 1, "ReloadNormally")
		TNT1 A 0 A_JumpIfInventory("Clip2",1,3)
		Goto NoAmmo
		TNT1 AAA 0
		TNT1 A 0 A_PlaySound("ZOUTY", 5)
		TNT1 A 0 A_Takeinventory("Zoomed",1)
		TNT1 A 0 A_GiveInventory ("Pumping", 1)
		TNT1 A 0 A_Takeinventory("Reloading",1)
		TNT1 A 0
		TNT1 A 0 A_JumpIfInventory("Kicking",1,"DoKick")
		RI3R ABC 1 A_WeaponReady(WRF_NOFIRE)
		TNT1 A 0 A_SetPitch(pitch + 0.2)
		RI3R D 1 A_WeaponReady(WRF_NOFIRE)
		TNT1 A 0 A_SetPitch(pitch + 0.2)
		RI3R E 1 A_WeaponReady(WRF_NOFIRE)
		TNT1 A 0 A_SetPitch(pitch + 0.1)
		RI3R F 1 A_WeaponReady(WRF_NOFIRE)
		TNT1 A 0 A_SetPitch(pitch + 0.1)
		RIFZ G 1 A_WeaponReady(WRF_NOFIRE)
		TNT1 A 0 A_SetPitch(pitch + 0.1)
		RIFZ H 1 A_WeaponReady(WRF_NOFIRE)
		TNT1 A 0 A_SetPitch(pitch + 0.1)
		RIFZ I 1 A_WeaponReady(WRF_NOFIRE)
		TNT1 A 0 A_FireCustomMissile("EmptyClipSpawn",-5,0,8,-4)
		TNT1 A 0 A_SetPitch(pitch + 0.1)
		RIFZ JJJJJJJJJJJJ 1 A_WeaponReady(WRF_NOFIRE)
		RIFZ L 1 A_WeaponReady(WRF_NOFIRE)
		RIFZ M 1 A_WeaponReady(WRF_NOFIRE)
		TNT1 A 0 A_SetPitch(pitch - 0.2)
		RIFZ N 1 A_WeaponReady(WRF_NOFIRE)
		TNT1 A 0 A_SetPitch(pitch - 0.2)
		TNT1 A 0 A_JumpIfInventory("Kicking",1,"DoKick")
		RIFZ O 1  A_WeaponReady(WRF_NOFIRE)
		TNT1 A 0 A_SetPitch(pitch - 0.1)
		RIZZ A 1 A_WeaponReady(WRF_NOFIRE)
		TNT1 A 0 A_SetPitch(pitch - 0.1)
		RIZZ B 1 A_WeaponReady(WRF_NOFIRE)
		TNT1 A 0 A_SetPitch(pitch - 0.1)
		RIZZ C 1 A_WeaponReady(WRF_NOFIRE)
		TNT1 A 0 A_SetPitch(pitch - 0.1)
		RIZZ D 1  A_WeaponReady(WRF_NOFIRE)
		TNT1 A 0 A_SetPitch(pitch - 0.1)
		TNT1 A 0 A_PlaySound("LIQY", 2)
		RIFZ PQ 1 A_WeaponReady(WRF_NOFIRE)
		HKFX BZA 1 A_WeaponReady(WRF_NOFIRE)
		HKFR ZY 1 A_WeaponReady(WRF_NOFIRE)
		TNT1 A 0 A_PlaySound("SLAPBABY",1)
		RIZO R 2 A_WeaponReady(WRF_NOFIRE)
		RIZO T 2 A_WeaponReady(WRF_NOFIRE)
		TNT1 A 0 A_SetPitch(pitch + 0.1)
		RIZO U 2 A_WeaponReady(WRF_NOFIRE)
		TNT1 A 0 A_SetPitch(pitch + 0.1)
			TNT1 A 0 A_PlaySound("EQUIPM", 2)
		RIZO V 2 A_WeaponReady(WRF_NOFIRE)
		TNT1 A 0 A_SetPitch(pitch - 0.1)
		RIZO W 2 A_WeaponReady(WRF_NOFIRE)
		TNT1 A 0 A_SetPitch(pitch - 0.1)
		RIZO X 2 A_WeaponReady(WRF_NOFIRE)
		TNT1 A 0 A_JumpIfInventory("Kicking",1,"DoKick")
		RI3R R 1 A_WeaponReady(WRF_NOFIRE)
		RI3R S 1 A_WeaponReady(WRF_NOFIRE)
		RI3R T 1 A_WeaponReady(WRF_NOFIRE)
		RI3R U 1 A_WeaponReady(WRF_NOFIRE)
		RI3R V 1 A_WeaponReady(WRF_NOFIRE)
		TNT1 A 0 A_JumpIfInventory("Kicking",1,"DoKick")
		TNT1 A 0 A_JumpIfInventory("MP40Ammo2",1,"InsertBullets2")//30+1 effect

		InsertBullets:
		TNT1 AAAA 0
		TNT1 A 0 A_JumpIfInventory("MP40Ammo2",20,15)
		TNT1 A 0 A_JumpIfInventory("Clip2",1,3)
		Goto RealReady
        TNT1 AAAAAA 0
		TNT1 A 0 A_Giveinventory("MP40Ammo2",1)
		TNT1 A 0 A_Takeinventory("Clip2",1)
		Goto InsertBullets
		
		TNT1 AAAAAAAAAA 0
		TNT1 A 0 A_Takeinventory("Reloading",1)
        Goto RealReady
		TNT1 AAAA 0
		TNT1 A 0 A_Takeinventory("Reloading",1)
        Goto RealReady
		
		ReloadNormally:
			TNT1 A 0 A_JumpIfInventory("Clip2",1,3)
		Goto NoAmmo
		TNT1 AAA 0
		
		TNT1 A 0 A_PlaySound("RANEQ", 2)
		TNT1 A 0 A_PlaySound("ZombieRifle/Clipout", 5)
		TNT1 A 0 A_Takeinventory("Zoomed",1)
		TNT1 A 0 A_GiveInventory ("Pumping", 1)
		TNT1 A 0 A_Takeinventory("Reloading",1)
		TNT1 A 0
		TNT1 A 0 A_JumpIfInventory("Kicking",1,"DoKick")
		RI3R A 1 A_WeaponReady(WRF_NOFIRE)
		TNT1 A 0 A_SetPitch(pitch + 0.2)
		HKFR V 1 A_WeaponReady(WRF_NOFIRE)
		HKFR U 1 A_WeaponReady(WRF_NOFIRE)
		TNT1 A 0 A_SetPitch(pitch + 0.2)
		HKFR TYZ 1 A_WeaponReady(WRF_NOFIRE)
		TNT1 A 0 A_SetPitch(pitch + 0.1)
		HKFX AZBC 1 A_WeaponReady(WRF_NOFIRE)
		TNT1 A 0 A_SetPitch(pitch + 0.1)
		RIZZ B 1 A_WeaponReady(WRF_NOFIRE)
		TNT1 A 0 A_SetPitch(pitch + 0.1)
		RIZZ A 1 A_WeaponReady(WRF_NOFIRE)
		TNT1 A 0 A_SetPitch(pitch + 0.1)
		RIFZ O 1 A_WeaponReady(WRF_NOFIRE)
		HKFE CBA 1 A_WeaponReady(WRF_NOFIRE)
		TNT1 A 0 A_SetPitch(pitch + 0.1)
		RIFZ JJJJJJJJJJJ 1 A_WeaponReady(WRF_NOFIRE)
		RIFZ L 1 A_WeaponReady(WRF_NOFIRE)
		RIFZ M 1 A_WeaponReady(WRF_NOFIRE)
		TNT1 A 0 A_SetPitch(pitch - 0.2)
		RIFZ NZ 1 A_WeaponReady(WRF_NOFIRE)
		TNT1 A 0 A_SetPitch(pitch - 0.2)
		TNT1 A 0 A_JumpIfInventory("Kicking",1,"DoKick")
		RIFZ O 1  A_WeaponReady(WRF_NOFIRE)
		TNT1 A 0 A_SetPitch(pitch - 0.1)
			TNT1 A 0 A_PlaySound("EQUIPM", 2)
		RIZZ A 1 A_WeaponReady(WRF_NOFIRE)
		TNT1 A 0 A_SetPitch(pitch - 0.1)
		RIZZ B 1 A_WeaponReady(WRF_NOFIRE)
		TNT1 A 0 A_SetPitch(pitch - 0.1)
		RIZZ C 1 A_WeaponReady(WRF_NOFIRE)
		TNT1 A 0 A_SetPitch(pitch - 0.1)
		RIZZ D 1  A_WeaponReady(WRF_NOFIRE)
		TNT1 A 0 A_SetPitch(pitch - 0.1)
		RIFZ PQ 1 A_WeaponReady(WRF_NOFIRE)
		RI3R RSTUV 1 A_WeaponReady(WRF_NOFIRE)
		TNT1 A 0 A_JumpIfInventory("Kicking",1,"DoKick")
		TNT1 A 0 A_JumpIfInventory("Kicking",1,"DoKick")
		TNT1 A 0 A_JumpIfInventory("MP40Ammo2",1,"InsertBullets2")//30+1 effect
		
	InsertBullets2:
		TNT1 AAAA 0
		TNT1 A 0 A_JumpIfInventory("MP40Ammo2",21,15)
		TNT1 A 0 A_JumpIfInventory("Clip2",1,3)
		Goto RealReady
        TNT1 AAAAAA 0
		TNT1 A 0 A_Giveinventory("MP40Ammo2",1)
		TNT1 A 0 A_Takeinventory("Clip2",1)
		Goto InsertBullets2
		
		TNT1 AAAAAAAAAA 0
		TNT1 A 0 A_Takeinventory("Reloading",1)
        Goto RealReady
		TNT1 AAAA 0
		TNT1 A 0 A_Takeinventory("Reloading",1)
        Goto RealReady
		
		Unload:
		RI3G A 1 A_WeaponReady
		TNT1 A 0 A_ZoomFactor(1.0)
		TNT1 A 0 A_Takeinventory("Unloading",1)
		TNT1 A 0 A_Takeinventory("ADSmode",1)
		TNT1 A 0 A_Takeinventory("Zoomed",1)
		//TNT1 A 0 A_TakeInventory("PowerLightAmp", 1)
        TNT1 A 0 A_JumpIfInventory("MP40Ammo2",1,3)
        Goto NoAmmo
        TNT1 AAA 0
		TNT1 A 0 A_Takeinventory("Zoomed",1)
		HKFR VUTSRQPO 1 A_WeaponReady(WRF_NOFIRE)
        HKFR N 1 A_playsound("ZUNLO", 5)
		TNT1 A 0 A_GiveInventory ("Pumping", 1)
		TNT1 A 0 A_Takeinventory("Unloading",1)
		
	RemoveBullets:
		TNT1 AAAA 0
		TNT1 A 0 A_JumpIfInventory("MP40Ammo2",1,3)
		Goto FinishUnload
        TNT1 AAAAAA 0
		TNT1 A 0 A_Takeinventory("MP40Ammo2",1)
		TNT1 A 0 A_Giveinventory("Clip2",2)
		Goto RemoveBullets
	
	FinishUnload:
		HKFR MLK 1 A_WeaponReady(WRF_NOFIRE)
		HKFR J 5 A_WeaponReady(WRF_NOFIRE)
		HKFR IGHGFEDCBA 1 A_WeaponReady(WRF_NOFIRE)
		TNT1 A 0 A_PlaySound("DryFire")
		TNT1 A 0 A_GiveInventory("HasUnloaded", 1)
		TNT1 A 0 A_Takeinventory("Unloading",1)
		Goto RealReady
		
 	Spawn:
		RIDL A -1
		Stop
 
 
 	TiredKickStart:
	    TNT1 A 0 SetPlayerProperty(0,1,0)
	    TNT1 A 0
		Goto DoKick+2
		
	TiredKickEnd:
	    TNT1 A 0
		TNT1 A 0 SetPlayerProperty(0,0,0)
		Goto Select	
		
		KickFlash:
		RI3G BCDE 1
		TNT1 A 6
		RI3G EDCBA 1
		Stop
	BersFlash:
		RI3G BCDE 1
		TNT1 A 6
		RI3G EDCBA 1
		Stop
	AirKikFlash:
		RI3G BCDE 1
		TNT1 A 9
		RI3G EDCBA 1
		Stop
		
		InsultFlash:
		RI3G BCDE 1
		TNT1 A 40
		Stop
	DoKick:
	    TNT1 A 0
		TNT1 A 0 A_TakeInventory("Zoomed",1)
        TNT1 A 0 A_ZoomFactor(1.0)
		TNT1 A 0 A_TakeInventory("ADSmode",1)
		NULL A 0 A_JumpIf (momZ > 0, "AirKick")
		NULL A 0 A_JumpIf (momZ < 0, "AirKick")
		NULL A 0 A_JumpIf(Height < 54, "SlideKick")
		TNT1 A 0 A_JumpIfInventory("PowerStrength",1,"BerserkerKick")
		TNT1 A 0 A_PlaySound("KICK", 1)
		TNT1 A 0 SetPlayerProperty(0,1,0)
		TNT1 A 0 A_GunFlash("KickFlash")
		TNT1 A 0 A_SetAngle(-0.5 + angle)
		TNT1 A 1 A_SetPitch(+0.5 + pitch)
		TNT1 A 0 A_SetAngle(-0.5 + angle)
		TNT1 A 1 A_SetPitch(+0.5 + pitch)
		TNT1 A 0 A_ZoomFactor(0.985)
		KICK B 1 A_SetPitch(+0.5 + pitch)
		TNT1 A 0 A_SetAngle(-0.5 + angle)
		TNT1 A 0 A_ZoomFactor(0.970)
		KICK C 1 A_SetAngle(-0.5 + angle)
		TNT1 A 0 A_ZoomFactor(0.965)
		TNT1 A 0 A_SetAngle(+0.5 + angle)
		KICK D 1 A_SetPitch(+1.25 + pitch)
		TNT1 A 0 A_ZoomFactor(0.950)
		RIfF A 0 A_FireCustomMissile("KickAttack", 0, 0, 0, -7)
		
        KICK H 3 
		TNT1 A 0 A_ZoomFactor(0.965)
		TNT1 A 0 A_SetAngle(+1 + angle)
		TNT1 A 0 A_Recoil(-1)
		KICK A 0 A_TakeInventory("Kicking",1)
		KICK I 1
		TNT1 A 0 A_ZoomFactor(0.970)
		TNT1 A 0 A_SetAngle(+1 + angle)
		KICK G 1 A_SetPitch(-0.5 + pitch)
		TNT1 A 0 A_ZoomFactor(0.985)
		TNT1 A 0 A_SetPitch(-0.5 + pitch)
		TNT1 A 0 A_ZoomFactor(0.998)
		TNT1 A 0 A_SetAngle(+0.5 + angle)
		TNT1 A 0 A_SetPitch(-0.5 + pitch)
		TNT1 A 0 A_ZoomFactor(0.999)
		TNT1 A 0 A_SetAngle(+0.5 + angle)
		KICK D 1 A_SetAngle(+0.5 + angle)
		TNT1 A 0 A_ZoomFactor(1.0)
		TNT1 A 0 A_SetPitch(-0.5 + pitch)
		KICK C 1 A_SetAngle(-0.5 + angle)
		KICK B 1 A_SetPitch(-1.25 + pitch)
		KICK A 1
		TNT1 A 0 SetPlayerProperty(0,0,0)
		TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
		Goto RealReady
		
	NormalKick:
	    TNT1 A 0
		TNT1 A 0 A_TakeInventory("Zoomed",1)
        TNT1 A 0 A_ZoomFactor(1.0)
		TNT1 A 0 A_TakeInventory("ADSmode",1)
		NULL A 0 A_JumpIf (momZ > 0, "AirKick")
		NULL A 0 A_JumpIf (momZ < 0, "AirKick")
		NULL A 0 A_JumpIf(Height < 54, "SlideKick")
		TNT1 A 0 A_JumpIfInventory("PowerStrength",1,"BerserkerKick")
		TNT1 A 0 A_PlaySound("KICK", 1)
		TNT1 A 0 SetPlayerProperty(0,1,0)
		TNT1 A 0 A_GunFlash("KickFlash")
		TNT1 A 0 A_SetAngle(-0.5 + angle)
		TNT1 A 1 A_SetPitch(+0.5 + pitch)
		TNT1 A 0 A_SetAngle(-0.5 + angle)
		TNT1 A 1 A_SetPitch(+0.5 + pitch)
		TNT1 A 0 A_ZoomFactor(0.985)
		KICK B 1 A_SetPitch(+0.5 + pitch)
		TNT1 A 0 A_SetAngle(-0.5 + angle)
		TNT1 A 0 A_ZoomFactor(0.970)
		KICK C 1 A_SetAngle(-0.5 + angle)
		TNT1 A 0 A_ZoomFactor(0.965)
		TNT1 A 0 A_SetAngle(+0.5 + angle)
		KICK D 1 A_SetPitch(+1.25 + pitch)
		TNT1 A 0 A_ZoomFactor(0.950)
		RIfF A 0 A_FireCustomMissile("KickAttack", 0, 0, 0, -7)
		
        KICK H 3 
		TNT1 A 0 A_ZoomFactor(0.965)
		TNT1 A 0 A_SetAngle(+1 + angle)
		TNT1 A 0 A_Recoil(-1)
		KICK A 0 A_TakeInventory("Kicking",1)
		KICK I 1
		TNT1 A 0 A_ZoomFactor(0.970)
		TNT1 A 0 A_SetAngle(+1 + angle)
		KICK G 1 A_SetPitch(-0.5 + pitch)
		TNT1 A 0 A_ZoomFactor(0.985)
		TNT1 A 0 A_SetPitch(-0.5 + pitch)
		TNT1 A 0 A_ZoomFactor(0.998)
		TNT1 A 0 A_SetAngle(+0.5 + angle)
		TNT1 A 0 A_SetPitch(-0.5 + pitch)
		TNT1 A 0 A_ZoomFactor(0.999)
		TNT1 A 0 A_SetAngle(+0.5 + angle)
		KICK D 1 A_SetAngle(+0.5 + angle)
		TNT1 A 0 A_ZoomFactor(1.0)
		TNT1 A 0 A_SetPitch(-0.5 + pitch)
		KICK C 1 A_SetAngle(-0.5 + angle)
		KICK B 1 A_SetPitch(-1.25 + pitch)
		KICK A 1
		TNT1 A 0 SetPlayerProperty(0,0,0)
		TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
		Goto RealReady
		
	SlideKickChecker:
		TNT1 A 0
		NULL A 0 A_JumpIf (Vely > 0, "SlideKick")
		NULL A 0 A_JumpIf (Velx > 0, "SlideKick")
		NULL A 0 A_JumpIf (Vely < 0, "SlideKick")
		NULL A 0 A_JumpIf (Velx < 0, "SlideKick")
		Goto NormalKick

	SlideKickFlash1:
		RI3G ABCDDDDDDDDDDDDDDDDDD 1
		RI3G DCBA 1
		Stop

	SlideKickFlash2:
		RI3G DDDDDDDDDDD 1
		RI3G DDD 1
		RI3G DCBA 1
		Stop

	SlideKickFlash3:
		RI3G DDD 1
		RI3G DDD 1
		RI3G DCBA 1
		Stop

	SlideKick:
		TNT1 A 0
		TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
//		TNT1 A 0 A_GunFlash("AirKikFlash")
		TNT1 A 0 A_Jump(128, "SlideKickRight")
		TNT1 A 0 A_GunFlash("SlideKickFlash1")
		TNT1 A 0 A_PlaySound("SlideKick/Start", 0)
		TNT1 A 0 A_Recoil (-2)
		KIC4 J 1 A_FireCustomMissile("SlideKickAttack", 0, 0, 0, -31)
		TNT1 A 0 A_Recoil (-2.50)
		KIC4 K 1 A_FireCustomMissile("SlideKickAttack", 0, 0, 0, -31)
		TNT1 A 0 A_Recoil (-3)
		KIC4 L 1 A_FireCustomMissile("SlideKickAttack", 0, 0, 0, -31)
		TNT1 A 0 A_Recoil (-3.50)
		KIC4 M 1 A_FireCustomMissile("SlideKickAttack", 0, 0, 0, -31)
		TNT1 A 0 A_Recoil (-4)
		KIC4 N 1 A_FireCustomMissile("SlideKickAttack", 0, 0, 0, -31)
		TNT1 A 0 A_Recoil (-4.50)
		RIFF A 0 A_FireCustomMissile("SlideKickAttack", 0, 0, 0, -31)
		TNT1 A 0 A_PlaySound("SlideKick/Loop", 1)
		TNT1 A 0 A_Recoil (-5)
	SlideKickLoop1:
		KIC4 OOOOO 1 A_FireCustomMissile("SlideKickAttack", 0, 0, 0, -31)
		TNT1 A 0 A_Recoil (-6)
		TNT1 A 0 A_GunFlash("SlideKickFlash2")
		KIC4 OOO 1 A_FireCustomMissile("SlideKickAttack", 0, 0, 0, -31)
		TNT1 A 0 A_Jump(60, "SlideKickLoop1")
		Goto SlideKickEnd1
	SlideKickEnd1:
		TNT1 A 0 A_StopSound(1)
		TNT1 A 0 A_GunFlash("SlideKickFlash3")
		TNT1 A 0 A_PlaySound("SlideKick/End", 1)
		KIC4 A 0 A_TakeInventory("Kicking",1)
		KIC4 PQRST 2 A_FireCustomMissile("SlideKickAttack", 0, 0, 0, -31)
		TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
		Goto RealReady

	SlideKickRight:
		TNT1 A 0
		TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
//		TNT1 A 0 A_GunFlash("AirKikFlash")
		TNT1 A 0 A_Jump(128, "SlideKickRight")
		TNT1 A 0 A_GunFlash("SlideKickFlash1")
		TNT1 A 0 A_PlaySound("SlideKick/Start", 0)
		TNT1 A 0 A_Recoil (-2)
		KIC5 J 1 A_FireCustomMissile("SlideKickAttack", 0, 0, 0, -31)
		TNT1 A 0 A_Recoil (-2.50)
		KIC5 K 1 A_FireCustomMissile("SlideKickAttack", 0, 0, 0, -31)
		TNT1 A 0 A_Recoil (-3)
		KIC5 L 1 A_FireCustomMissile("SlideKickAttack", 0, 0, 0, -31)
		TNT1 A 0 A_Recoil (-3.50)
		KIC5 M 1 A_FireCustomMissile("SlideKickAttack", 0, 0, 0, -31)
		TNT1 A 0 A_Recoil (-4)
		KIC5 N 1 A_FireCustomMissile("SlideKickAttack", 0, 0, 0, -31)
		TNT1 A 0 A_Recoil (-4.50)
		RIFF A 0 A_FireCustomMissile("SlideKickAttack", 0, 0, 0, -31)
		TNT1 A 0 A_PlaySound("SlideKick/Loop", 1)
		TNT1 A 0 A_Recoil (-5)
	SlideKickLoop2:
		KIC5 OOOOO 1 A_FireCustomMissile("SlideKickAttack", 0, 0, 0, -31)
		TNT1 A 0 A_Recoil (-6)
		TNT1 A 0 A_GunFlash("SlideKickFlash2")
		KIC5 OOO 1 A_FireCustomMissile("SlideKickAttack", 0, 0, 0, -31)
		TNT1 A 0 A_Jump(60, "SlideKickLoop2")
		Goto SlideKickEnd2
	SlideKickEnd2:
		TNT1 A 0 A_StopSound(1)
		TNT1 A 0 A_GunFlash("SlideKickFlash3")
		TNT1 A 0 A_PlaySound("SlideKick/End", 1)
		KIC5 A 0 A_TakeInventory("Kicking",1)
		KIC5 PQRST 2 A_FireCustomMissile("SlideKickAttack", 0, 0, 0, -31)
		TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
		Goto RealReady

	BerserkerKick:
		 TNT1 A 0
		TNT1 A 0 A_TakeInventory("Zoomed",1)
        TNT1 A 0 A_ZoomFactor(1.0)
		TNT1 A 0 A_TakeInventory("ADSmode",1)
		NULL A 0 A_JumpIf (momZ > 0, "AirKick")
		NULL A 0 A_JumpIf (momZ < 0, "AirKick")
		NULL A 0 A_JumpIf(Height < 54, "SlideKick")
		
		TNT1 A 0 A_PlaySound("KICK", 1)
		TNT1 A 0 SetPlayerProperty(0,1,0)
		TNT1 A 0 A_GunFlash("KickFlash")
		TNT1 A 0 A_SetAngle(-0.5 + angle)
		TNT1 A 1 A_SetPitch(+0.5 + pitch)
		TNT1 A 0 A_SetAngle(-0.5 + angle)
		TNT1 A 1 A_SetPitch(+0.5 + pitch)
		TNT1 A 0 A_ZoomFactor(0.985)
		KICK B 1 A_SetPitch(+0.5 + pitch)
		TNT1 A 0 A_SetAngle(-0.5 + angle)
		TNT1 A 0 A_ZoomFactor(0.970)
		KICK C 1 A_SetAngle(-0.5 + angle)
		TNT1 A 0 A_ZoomFactor(0.965)
		TNT1 A 0 A_SetAngle(+0.5 + angle)
		KICK D 1 A_SetPitch(+1.25 + pitch)
		TNT1 A 0 A_ZoomFactor(0.950)
		RIFF A 0 A_FireCustomMissile("SuperKickAttack", 0, 0, 0, -7)
        KICK H 3 
		TNT1 A 0 A_ZoomFactor(0.965)
		TNT1 A 0 A_SetAngle(+1 + angle)
		TNT1 A 0 A_Recoil(-1)
		KICK A 0 A_TakeInventory("Kicking",1)
		KICK I 1
		TNT1 A 0 A_ZoomFactor(0.970)
		TNT1 A 0 A_SetAngle(+1 + angle)
		KICK G 1 A_SetPitch(-0.5 + pitch)
		TNT1 A 0 A_ZoomFactor(0.985)
		TNT1 A 0 A_SetPitch(-0.5 + pitch)
		TNT1 A 0 A_ZoomFactor(0.998)
		TNT1 A 0 A_SetAngle(+0.5 + angle)
		TNT1 A 0 A_SetPitch(-0.5 + pitch)
		TNT1 A 0 A_ZoomFactor(0.999)
		TNT1 A 0 A_SetAngle(+0.5 + angle)
		KICK D 1 A_SetAngle(+0.5 + angle)
		TNT1 A 0 A_ZoomFactor(1.0)
		TNT1 A 0 A_SetPitch(-0.5 + pitch)
		KICK C 1 A_SetAngle(-0.5 + angle)
		KICK B 1 A_SetPitch(-1.25 + pitch)
		KICK A 1
		TNT1 A 0 SetPlayerProperty(0,0,0)
		TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
		Goto RealReady



	NormalAirKick:	
		TNT1 A 0 A_jumpifinventory("PowerStrength",1,"SuperAirKick")
		TNT1 A 0 A_PlaySound("KICK", 0)
		TNT1 A 0 A_Recoil (-6)
		TNT1 A 0 A_GunFlash("AirKikFlash")
		KICK JKLMN 1
		RIFF A 0 A_FireCustomMissile("AirKickAttack", 0, 0, 0, -31)
		KICK O 3
		KICK A 0 A_Takeinventory("Kicking",1)
		KICK PQRST 2
		TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
		Goto RealReady
		
		
	AirKick:
	    TNT1 A 0
		TNT1 A 0 A_GunFlash("KickFlash")
		TNT1 A 0 A_GiveInventory("UsedStamina", 50)
		NULL A 0 A_JumpIf (pitch < 40, 1)
		Goto Stomp

		
	NormalAirKick:
		TNT1 A 0 A_jumpifinventory("PowerStrength",1,"SuperAirKick")
		TNT1 A 0 A_PlaySound("KICK", 0)
		TNT1 A 0 A_Recoil (-6)
		TNT1 A 0 A_GunFlash("AirKikFlash")
		KICK JKLMN 1
		RIFF A 0 A_FireCustomMissile("AirKickAttack", 0, 0, 0, -31)
		KICK O 3
		KICK A 0 A_Takeinventory("Kicking",1)
		KICK PQRST 2
		TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
		Goto RealReady

	SuperAirKick:
		TNT1 A 0 A_PlaySound("KICK", 0)
		TNT1 A 0 A_Recoil (-6)
		TNT1 A 0 A_GunFlash("AirKikFlash")
		KICK JKLMN 1
		RIFF A 0 A_FireCustomMissile("SuperAirKickAttack", 0, 0, 0, -31)
		KICK O 3
		KICK A 0 A_Takeinventory("Kicking",1)
		KICK PQRST 2
		TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
		Goto RealReady
		
		StompKickFlash:
		STOM ABCDDDDE 1
		Stop
		
			Stomp:
	    TNT1 A 0 A_TakeInventory("Kicking", 1)
		TNT1 A 0 A_GunFlash("StompKickFlash")
	    NULL A 0 A_JumpIf (pitch > 90, "NormalAirKick")
		TNT1 A 0 A_PlaySound("KICK")
		TNT1 A 0 A_jumpifinventory("PowerStrength",1,"SuperStomp")
		TNT1 A 0 SetPlayerProperty(0,1,0)
		STOM ABCDDDDE 1
		TNT1 A 0 ThrustThingZ(0,-5,0,1)
		STOM EE 1
		TNT1 A 0 A_SetPitch(75)
        RIFF A 0 A_FireCustomMissile("StompAttack", 0, 0, 15, -11)
		RIFF A 0 A_FireCustomMissile("StompAttack", 0, 0, -15, -11)
		TNT1 A 0 A_SpawnItem("FootStepStrong")
        STOM F 5
		KICK A 0 A_Takeinventory("Kicking",1)
		STOM GH 2
		TNT1 A 0 SetPlayerProperty(0,0,0)
		TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
		TNT1 A 0 A_jumpIfInventory("UsedStamina", 500, "TiredKickEnd")
		Goto RealReady
		
	
	SuperStomp:
		TNT1 A 0 A_GunFlash("StompKickFlash")
		TNT1 A 0 A_PlaySound("KICK")
		TNT1 A 0 SetPlayerProperty(0,1,0)
		STOM ABCDDDDE 1
		TNT1 A 0 ThrustThingZ(0,-5,0,1)
		STOM EE 1
		TNT1 A 0 A_SetPitch(75)
        RIFF A 0 A_FireCustomMissile("SuperStompAttack", 0, 0, 15, -11)
		RIFF A 0 A_FireCustomMissile("SuperStompAttack", 0, 0, -15, -11)
		TNT1 A 0 A_SpawnItem("FootStepStrong")
        STOM F 5
		KICK A 0 A_Takeinventory("Kicking",1)
		STOM GH 2
		TNT1 A 0 SetPlayerProperty(0,0,0)
		TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
		TNT1 A 0 A_jumpIfInventory("UsedStamina", 600, "TiredKickEnd")
		Goto RealReady
	Taunt:
		TNT1 A 0 A_GunFlash("InsultFlash")
		TNT1 A 0 A_TakeInventory("Zoomed", 1)
		TNT1 A 0 A_ZoomFactor(1.0)
		TNT1 A 5
		FUCK A 2 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH) 
		TNT1 A 0 A_FireCustomMissile("Taunter", 0, 0, -1, 0)
		TNT1 A 0 A_FireCustomMissile("Taunter", -9, 0, -1, 0)
		TNT1 A 0 A_FireCustomMissile("Taunter", 9, 0, -1, 0)
		FUCK B 2 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH) 
		TNT1 A 0 A_PlaySound("FUCK",4)
		FUCK C 2 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH) 
		TNT1 A 0 A_AlertMonsters
		FUCK D 15 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH) 
		TNT1 A 0 A_TakeInventory("Taunting",1)
		FUCK CBA 2 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)  
		TNT1 A 5
		Goto Ready
	Salute:
		TNT1 A 0 SetPlayerProperty(0,1,0)
		TNT1 A 0 A_ALertMonsters
		SALU ABCDEDCDEDCDEDCBA 4 A_JumpIfInventory("Kicking", 1, "DoKick")
		TNT1 A 0 A_TakeInventory("Salute1",1)
		TNT1 A 0 A_TakeInventory("Salute2",1)
		TNT1 A 0 SetPlayerProperty(0,0,0)
		Goto Ready
			
	CheckGrab:
	    TNT1 A 0 
		TNT1 A 0 A_JumpIfTargetInLOS("CheckDistanceGrab")
		Goto RealReady
	CheckDistanceGrab:
	    TNT1 A 0 
		TNT1 A 0 A_JumpIfCloser(100, "Grab")
		Goto RealReady
	CheckIfCanGrab:
	    TNT1 A 0 
		TNT1 A 0 A_JumpIfInTargetInventory("CanGrab", 1, "Grab")
		Goto RealReady
	Grab:
	    PKUP ABC 2
		TNT1 A 0 A_CustomMissile("PickupProjectile")
		PKUP DEF 2
		Goto Ready
		
	TossGrenade:	
		TNT1 A 0
		TNT1 A 0 A_TakeInventory("TossGrenade", 1)
		TNT1 A 0 A_JumpIfInventory("GrenadeAmmo", 1, 1)
		Goto NoGrenade
		GRTH ABCD 1
		TNT1 A 0 A_GiveInventory("FiredGrenade", 1)
		TNT1 A 0 A_PLaySound ("GRNPIN",3)
		GRTH EEFG 1
		TNT1 A 2 A_SetPitch(-0.5 + pitch)
		TNT1 A 2 A_SetPitch(-0.5 + pitch)
		TNT1 A 2 A_SetPitch(-0.25 + pitch)
		TNT1 A 2 A_SetPitch(-0.25 + pitch)
		TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSwitch)
		GRTH H 1 A_PLaySound ("GRNTOSS")
		 TNT1 A 0 A_FireCustomMissile("ShakeYourAss",0,0,0,0)
		TNT1 A 0 A_TakeInventory("GrenadeAmmo", 1)
		TNT1 A 0 A_FireCustomMissile("HandGrenade", random(-2,2), 0, 0, 0, 0, 0)
		GRTH I 1
		TNT1 A 0 A_SetPitch(+0.3 + pitch)
		GRTH J 1
		TNT1 A 0 A_SetPitch(+1 + pitch)
		GRTH K 1
		 TNT1 A 0 A_SetPitch(+1 + pitch)
		GRTH L 1
		 TNT1 A 0 A_SetPitch(+1 + pitch)
		GRTH M 1
		TNT1 A 0 A_SetPitch(-0.5 + pitch)
			TNT1 A 1 A_TakeInventory("TossGrenade",1)
			TNT1 A 0 A_SetPitch(-0.5 + pitch)
		TNT1 A 4 A_SetPitch(-0.5 + pitch)
		TNT1 A 1 
		TNT1 A 0 A_TakeInventory("TossGrenade", 1)
		Goto Ready	
	NoGrenade:
		TNT1 A 0
		TNT1 A 0 A_Print("No Grenades Left.")
		Goto RealReady	
	}
}

Actor MPAmmo: Inventory
{
inventory.maxamount 32
}