ACTOR ClassicFist : Weapon
{
	Game Doom
	Weapon.SelectionOrder 4
	Weapon.Kickback 100
	Obituary "$OB_MPFIST"
	Tag "$TAG_FIST"
	+WEAPON.MELEEWEAPON
	+WEAPON.CHEATNOTWEAPON
	+WEAPON.NOALERT
	+WEAPON.NOAUTOAIM
	States
	{
	Ready:
	    TNT1 A 0 A_TakeInventory("Rifle")
		TNT1 A 0 A_TakeInventory("DualRifles")
		PKFS A 1 A_WeaponReady
		TNT1 A 0 A_TakeInventory("Rifle")
		TNT1 A 0 A_TakeInventory("DualRifles")
		Loop
	Deselect:
		PKFS A 1 A_Lower
		TNT1 A 0 A_TakeInventory("Rifle")
		TNT1 A 0 A_TakeInventory("DualRifles")
		Loop
	Select:
		PKFS A 1 A_Raise
		Loop
	Fire:
	    TNT1 A 0 A_jumpifinventory("PowerStrength",1,"Fire2")
		PKFS B 1 A_Giveinventory("Punching",1)
		TNT1 A 0 A_PlaySound("skeleton/swing")
		PKFS CD 1
		PKFS E 2 A_FireCustomMissile("MeleeStrike2", 0, 0, 0, -5)
		PKFS FGHIJKL 2
		Goto Ready
	Fire2:
		PKFS B 1 A_Giveinventory("Punching",1)
		TNT1 A 0 A_PlaySound("weapons/gswing")
		PKFS CD 1
		PKFS E 2 A_FireCustomMissile("MeleeStrike2Smash", 0, 0, 0, -5)
		PKFS FGHIJK 2
		Goto Ready	
	}
}




ACTOR ClassicSaw : Weapon
{
	Game Doom
	Weapon.Kickback 0
	Weapon.SelectionOrder 2
	Weapon.UpSound "weapons/sawup"
	Weapon.ReadySound "none"
	Inventory.PickupMessage "$GOTCHAINSAW"
	Obituary "$OB_MPCHAINSAW"
	Tag "$TAG_CHAINSAW"
	+WEAPON.MELEEWEAPON
	+WEAPON.CHEATNOTWEAPON
	+WEAPON.AXEBLOOD
	States
	{
	Ready:
		TNT1 A 0
		TNT1 A 0 A_Takeinventory("HasCutingWeapon",1)
		TNT1 A 0 A_PlaySound("weapons/sawidle", 2)
		TNT1 A 0 A_JumpIfInventory("PowerBloodOnVisor",1,"Ready.Blood")
        TNT1 A 0 A_JumpIfInventory("PowerBlueBloodOnVisor",1,"Ready.BlueBlood")
        TNT1 A 0 A_JumpIfInventory("PowerGreenBloodOnVisor",1,"Ready.GreenBlood")
		
		VSAW ABAB 2 A_WeaponReady
		TNT1 A 0 A_TakeInventory("Chain_saw")
		Loop
		
	Ready.Blood:
		VSRW ABAB 2 A_WeaponReady
		TNT1 A 0 A_TakeInventory("Chain_saw")
		Goto Ready
		
	Ready.BlueBlood:
		VSBW ABAB 2 A_WeaponReady
		TNT1 A 0 A_TakeInventory("Chain_saw")
		Goto Ready
		
	Ready.GreenBlood:
		VSGW ABAB 2 A_WeaponReady
		TNT1 A 0 A_TakeInventory("Chain_saw")
		Goto Ready	
		
	Deselect:
		VSAW A 1 A_Lower
		Loop
	Select:
		VSAW A 1 A_Raise
		
		Loop
	Fire:
		TNT1 A 0
		TNT1 A 0 A_Giveinventory("HasCutingWeapon",1)
		TNT1 A 0 A_JumpIfInventory("PowerBloodOnVisor",1,"Fire.Blood")
        TNT1 A 0 A_JumpIfInventory("PowerBlueBloodOnVisor",1,"Fire.BlueBlood")
        TNT1 A 0 A_JumpIfInventory("PowerGreenBloodOnVisor",1,"Fire.GreenBlood")
		VSAW CD 2 A_Saw("weapons/chainsaw/loop", "CSAWCUT", 3, "SSawPuff")
		SAWG B 0 A_ReFire
		Goto Ready
		
	Fire.Blood:
		VSRW CD 2 A_Saw("weapons/chainsaw/loop", "CSAWCUT", 3, "SSawPuff")
		SAWG B 0 A_ReFire
		Goto Ready
	
	Fire.BlueBlood:
		VSBW CD 2 A_Saw("weapons/chainsaw/loop", "CSAWCUT", 3, "SSawPuff")
		SAWG B 0 A_ReFire
		Goto Ready
		
	Fire.GreenBlood:
		VSGW CD 2 A_Saw("weapons/chainsaw/loop", "CSAWCUT", 3, "SSawPuff")
		SAWG B 0 A_ReFire
		Goto Ready
	
	Spawn:
		CSAW A -1
		Stop
	}
}

ACTOR ClassicBDPistol : Weapon
{
	Weapon.AmmoUse1 0
	Weapon.AmmoGive1 15
	Weapon.AmmoUse2 0
	Weapon.AmmoGive2 0
	Weapon.AmmoType1 "Magazine"
	Weapon.AmmoType2 "BDPistolAmmo"
	Obituary "%o was shot down by %k's pistol."
    AttackSound "None"
    Inventory.PickupSound "CLIPIN"
	Inventory.Pickupmessage "You got the Pistol!"
	+WEAPON.WIMPY_WEAPON
    +WEAPON.NOAUTOAIM
    +WEAPON.NOAUTOFIRE
	+WEAPON.CHEATNOTWEAPON
    +FORCEXYBILLBOARD
	Scale 0.9
	States
	{
	PickUp:
	TNT1 A 0
	TNT1 A 0 A_Playsound("PICKUPONELINER")
	TNT1 A 0
	Stop
	
	
	Flash:
	TNT1 A 0
	TNT1 A 0 A_JumpIfInventory("FlashlightAction", 1, "CheckFlashlight")
	TNT1 A 1
	TNT1 A 0 A_JumpIfInventory("IsFlashlightOn", 1, "FlashOn")
	Goto Flash
	FlashOn:
	TNT1 A 0 A_FireCustomMissile("FlashlightProjectile", 0, 0, 0, 0, 0, 0)
	TNT1 A 0 A_FireCustomMissile("FlashlightSource", 0, 0, 0, 0, 0, 0)
	Goto Flash 
	CheckFlashLight:
	TNT1 A 1
	TNT1 A 0 A_TakeInventory("FlashlightAction")
	TNT1 A 0 A_JumpIfInventory("IsFlashlightOn", 1, "TurnOffFlashlight")
	TNT1 A 0 A_GiveInventory("IsFlashlightOn", 1)
	Goto Flash
	TurnOffFlashlight:
	TNT1 A 0 A_TakeInventory("IsFlashlightOn", 1)
	Goto Flash
	
	Ready:
        TNT1 A 1 A_JumpIfInventory("GoFatality", 1, "Steady")
        TNT1 A 0 A_PlaySound("CLIPIN")
        P4SS AB 1
        TNT1 AAAAAAAA 0
        TNT1 A 0 //A_JumpIfInventory("BDPistolAmmo",1,2)
        //Goto Reload
        TNT1 AAAA 0

        TNT1 A 0 A_JumpIfInventory("Kicking",1,"DoKick")
        TNT1 A 0 A_JumpIfInventory("Taunting",1,"Taunt")
		TNT1 A 0 A_JumpIfInventory("Salute1", 1, "Salute")
		TNT1 A 0 A_JumpIfInventory("Salute2", 1, "Salute")
        TNT1 A 0 A_JumpIfInventory("Reloading",1,"Reload")
		TNT1 A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
		P4SG A 1 A_WeaponReady
		TNT1 A 0 A_TakeInventory("Rifle")
		TNT1 A 0 A_TakeInventory("DualRifles")
		TNT1 A 0 A_TakeInventory("SMG")
		TNT1 A 0 A_TakeInventory("DMR")
		TNT1 A 0 A_TakeInventory("Auto_ShotGun")
		TNT1 A 0 A_TakeInventory("CyberRocket_Launcher")
		tnt1 a 0 A_takeinventory("Handgun",1)
		Goto Ready+9
	Deselect:
        P4SS BA 1
		TNT1 AAAAAAAAAAAAAAAAAA 0 A_Lower
		TNT1 A 0 A_TakeInventory("TossGrenade", 1)
		TNT1 A 1 A_Lower
		Wait
	Select:
	
	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_Raise
		Wait
    Fire:
        TNT1 A 0 A_JumpIfInventory("BDPistolAmmo",1,2)
        Goto Reload
        TNT1 AAAA 0
        TNT1 A 0 A_PlaySound("weapons/rifle")
		TNT1 A 0 A_FireCustomMissile("YellowFlareSpawn",0,0,0,0)
		P4SF A 1 BRIGHT A_FireBullets (2, 2, -1, 11, "HitPuff")
        RIFF A 0 A_FireCustomMissile("Tracer", random(-2,2), 0, 0, -16)
		TNT1 A 0 A_FireCustomMissile("ShakeYourAssMinor", 0, 0, 0, 0)
		TNT1 A 0 A_Takeinventory("BDPistolAmmo",1)
        P4SF B 1
		TNT1 A 0 A_FireCustomMissile("RifleCaseSpawn",5,0,8,-9)
		P4SF C 1 A_WeaponReady(1)
		P4SG A 7 A_WeaponReady(1)
		Goto Ready+6
		
	NoAmmo:
	P4SG A 1
	Goto Ready+10
	
    Reload:
		P4SG A 1 A_WeaponReady
		TNT1 A 0 A_Takeinventory("Reloading",1)
		TNT1 A 0 A_Takeinventory("ADSmode",1)
		TNT1 A 0 A_JumpIfInventory("BDPistolAmmo",15,26)

        TNT1 A 0 A_JumpIfInventory("Magazine",1,3)
        Goto NoAmmo
        TNT1 AAA 0
		TNT1 A 0 A_Takeinventory("Zoomed",1)
        TNT1 A 0 A_ZoomFactor(1.0)
        TNT1 A 0 A_PlaySound("Reload")
		TNT1 A 0 A_GiveInventory ("Pumping", 1)
		TNT1 A 0 A_Takeinventory("Reloading",1)
		RIFR C 0 A_FireCustomMissile("EmptyClipSpawn",-5,0,8,-4)
        P4SR A 6 
        P4SR BCDEFG 3
		
		TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAA 0
		TNT1 A 0 A_JumpIfInventory("BDPistolAmmo",15,15)
		TNT1 A 0 A_JumpIfInventory("Magazine",1,3)
		Goto Ready+6
        TNT1 AAAAAA 0
		TNT1 A 0 A_Giveinventory("BDPistolAmmo",1)
		TNT1 A 0 A_Takeinventory("Magazine",1)
		Goto Reload+28
		
		TNT1 AAAAAAAAAA 0
		TNT1 A 0 A_Takeinventory("Reloading",1)
        Goto Ready+6
		TNT1 AAAA 0
				TNT1 A 0 A_Takeinventory("Reloading",1)
        Goto Ready+6
 	Spawn:
		RIFL A -1
		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 (pitch > 32, "LowKickChecker1")
	InitializeNormalKick:
        TNT1 A 0 A_jumpifinventory("PowerStrength",1,"BerserkerKick")
		TNT1 A 0 A_PlaySound("KICK")
		TNT1 A 0 SetPlayerProperty(0,1,0)
		STMP ABCDEF 1
		//TNT1 A 0 A_Custompunch(4,0,1,"KickPuff")
		RIFF A 0 A_FireCustomMissile("KickAttack", 0, 0, 0, -7)
        STMP G 4
		KICK A 0 A_Takeinventory("Kicking",1)
		STMP HIJK 2
		TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
		TNT1 A 0 SetPlayerProperty(0,0,0)
		NULL A 0 A_TakeInventory("KickHasHit",1)
		Goto Ready+6
	LowKickChecker1:
	    TNT1 A 1
	    NULL A 0 A_JumpIf (pitch > 90, "InitializeNormalKick")
		Goto LowKick
		
	LowKick:
		TNT1 A 0 A_PlaySound("KICK")
		TNT1 A 0 SetPlayerProperty(0,1,0)
		TNT1 A 0 A_Recoil(-2)
		TNT1 A 0 A_SpawnItemEx ("PLOFT5",15,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
		KICK UVW 1 A_SetPitch(-8.0 + pitch)
		KICK X 1
		RIFF A 0 A_FireCustomMissile("KickAttackLow", 0, 0, 0, 0)
		KICK Y 1
        KICK Z 4
		KICK YX 1
		KICK A 0 A_Takeinventory("Kicking",1)
		KICK WVU 1
		TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
		TNT1 A 0 SetPlayerProperty(0,0,0)
		NULL A 0 A_TakeInventory("KickHasHit",1)
		Goto Ready+6	
		
    BerserkerKick:
		TNT1 A 0 A_PlaySound("KICK")
		TNT1 A 0 SetPlayerProperty(0,1,0)
		KICK ABCDEFG 1
        RIFF A 0 A_FireCustomMissile("SuperKickAttack", 0, 0, 0, -7)
        KICK H 3
		KICK A 0 A_Takeinventory("Kicking",1)
		KICK IGFEDCBA 1
		TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
		TNT1 A 0 SetPlayerProperty(0,0,0)
		NULL A 0 A_TakeInventory("KickHasHit",1)
		Goto Ready+6
	
	AirKick:
	    TNT1 A 0 A_jumpifinventory("PowerStrength",1,"SuperAirKick")
		TNT1 A 0 A_PlaySound("KICK")
		TNT1 A 0 A_Recoil (-2)
		KICK JKLMNO 1
        RIFF A 0 A_FireCustomMissile("AirKickAttack", 0, 0, 0, -8)
        KICK P 3
		KICK A 0 A_Takeinventory("Kicking",1)
		KICK QRST 2
		TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
		NULL A 0 A_TakeInventory("KickHasHit",1)
		Goto Ready+6
		
	
	SuperAirKick:
	    TNT1 A 0
		TNT1 A 0 A_PlaySound("KICK")
		TNT1 A 0 A_Recoil (-2)
		KICK JKLMNO 1
        RIFF A 0 A_FireCustomMissile("SuperAirKickAttack", 0, 0, 0, -8)
        KICK P 3
		KICK A 0 A_Takeinventory("Kicking",1)
		KICK QRST 2
		TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
		NULL A 0 A_TakeInventory("KickHasHit",1)
		Goto Ready+6
	
	Taunt:
		TNT1 A 0 A_Takeinventory("Zoomed",1)
        TNT1 A 0 A_ZoomFactor(1.0)
		TNT1 A 0 A_Takeinventory("Taunting",1)
		TNT1 A 0 A_JumpIfInventory("RealismMode", 1, "CheckGrab")
        TNT1 A 10
		FUCK A 1
		TNT1 A 0 BRIGHT A_FireCustomMissile("Taunter", 0, 0, -1, 0)
		TNT1 A 0 BRIGHT A_FireCustomMissile("Taunter", -9, 0, -1, 0)
		TNT1 A 0 BRIGHT A_FireCustomMissile("Taunter", 9, 0, -1, 0)
        FUCK B 1 A_PlaySound("FUCK", 2)
        FUCK CD 1 A_AlertMonsters
		FUCK E 15 A_Takeinventory("Taunting",1)
        FUCK DCBA 1
        TNT1 A 10
		Goto Ready
	Salute:
	    TNT1 A 0 SetPlayerProperty(0,1,0)
		TNT1 A 0 A_ALertMonsters
		SALU ABCDEDCDEDCDEDCBA 4
		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 Ready+6
	CheckDistanceGrab:
	    TNT1 A 0 
		TNT1 A 0 A_JumpIfCloser(100, "Grab")
		Goto Ready+6
	CheckIfCanGrab:
	    TNT1 A 0 
		TNT1 A 0 A_JumpIfInTargetInventory("CanGrab", 1, "Grab")
		Goto Ready+6	
	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")
		GRTH EEFG 1
		TNT1 A 0 A_PLaySound ("GRNTOSS")
		GRTH HI 1
		TNT1 A 0 A_TakeInventory("GrenadeAmmo", 1)
		TNT1 A 0 A_FireCustomMissile("HandGrenade", random(-2,2), 0, 0, 0, 0, 0)
	    TNT1 A 0 A_TakeInventory("FiredGrenade", 1)
		GRTH JKLM 1
		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 REady+6	
	}
}

ACTOR ClassicRifle : DoomWeapon
{
	Weapon.AmmoUse1 0
	Weapon.AmmoGive1 10
	Weapon.AmmoUse2 0
	Weapon.AmmoGive2 0
	YScale 0.6
	XScale 0.8
	Weapon.SelectionOrder 4500
	Weapon.AmmoType1 "Clip2"
	Weapon.AmmoType2 "RifleAmmo"
	Obituary "%o was shot down by %k's assault rifle."
    AttackSound "None"
    Inventory.PickupSound "CLIPIN"
	Inventory.Pickupmessage "You got the Assault Rifle!"
	+WEAPON.WIMPY_WEAPON
    +WEAPON.NOAUTOAIM
    +WEAPON.NOALERT
    +WEAPON.NOAUTOFIRE
	+WEAPON.CHEATNOTWEAPON
	+FORCEXYBILLBOARD
	+WEAPON.NO_AUTO_SWITCH
    Scale 0.8
	States
	{
	PickUp:
	TNT1 A 0 A_Playsound("PICKUPONELINER")
	TNT1 A 0
	Stop
	
	Steady:
	TNT1 A 1
	Goto Ready
	
	WarmUp:
		TNT1 A 0
		TNT1 A 0 A_TakeInventory("JustStartedGame", 1)
		TNT1 A 5 A_WeaponReady
		PUNS ABCD 1 A_WeaponReady
		TNT1 A 0 A_PlaySound("Knuckled")
		PUNS E 7 A_WeaponReady
		PUNS FGFE 3 A_WeaponReady
		PUNS DCB 1 A_WeaponReady
		TNT1 A 5 A_WeaponReady
		R2RL ABCDE 1 A_WeaponReady
        R2RL EEEEEEE 2 A_WeaponReady
		RIFR HIKL 1 A_WeaponReady
		TNT1 A 0 A_PlaySound("DryFire")
		RIFR MMM 1 A_WeaponReady
		RIFR NOPQRST 1 A_WeaponReady
		Goto Ready+9
	
	Ready:
        TNT1 A 2 A_JumpIfInventory("GoFatality", 1, "Steady")
		
		TNT1 A 0 A_JumpIfInventory("JustStartedGame",1,"WarmUp")
        TNT1 A 0 A_PlaySound("CLIPIN")
        R4FS ABC 1
        TNT1 AAAAAAAA 0
        TNT1 A 0 //A_JumpIfInventory("RIFleAmmo",1,2)
        //Goto Reload
        TNT1 AAAA 0

        TNT1 A 0 A_JumpIfInventory("Kicking",1,"DoKick")
        TNT1 A 0 A_JumpIfInventory("Taunting",1,"Taunt")
		TNT1 A 0 A_JumpIfInventory("Salute1", 1, "Salute")
		TNT1 A 0 A_JumpIfInventory("Salute2", 1, "Salute")
        TNT1 A 0 A_JumpIfInventory("Reloading",1,"Reload")
		TNT1 A 0 A_JumpIfInventory("Unloading",1,"Unload")
		TNT1 A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
		TNT1 A 0 A_TakeInventory("RifleSpread", 5)
		R4FG A 1 A_WeaponReady
		TNT1 A 0 A_JumpIfInventory("JustStartedGame",1,"WarmUp")
		TNT1 A 0 A_TakeInventory("UsedStamina", 1)
		TNT1 A 0 A_TakeInventory("Rifle")
		TNT1 A 0 A_TakeInventory("DualRifles")
		TNT1 A 0 A_TakeInventory("SMG")
		TNT1 A 0 A_TakeInventory("DMR")
		TNT1 A 0 A_TakeInventory("Auto_ShotGun")
		TNT1 A 0 A_TakeInventory("CyberRocket_Launcher")
        Goto Ready+9
    Ready2:
        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")
		
		R42G A 2 A_WeaponReady(WRF_nobob)
		TNT1 A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
		TNT1 A 0 A_TakeInventory("UsedStamina", 2)
		Loop
	Deselect:
		TNT1 A 0
		TNT1 A 0 A_Takeinventory("Zoomed",1)
		TNT1 A 0 A_Takeinventory("ADSmode",1)
		TNT1 A 0 A_TakeInventory("TossGrenade", 1)
        TNT1 A 0 A_ZoomFactor(1.0)
		R4FS CBA 1
		TNT1 AAAAAAAAAAAAAAAAAA 0 A_Lower
		TNT1 A 1
		Wait
		
	Select:
		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)
		MARN A 0 ACS_ExecuteAlways(728, 0, 0, 0, 0)//Check if penetration is on.
		TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_Raise
		
		Goto Ready
	
    Fire:
        TNT1 A 0 A_JumpIfInventory("RifleAmmo",1,2)
        Goto Reload
        TNT1 AAAA 0
		tnt1 a 0 A_jump(170,"Fire_2","Fire_3")
		//TNT1 A 0 A_JumpIfInventory("RifleSpread", 5, "FireHighSpread")
		TNT1 A 0 A_Takeinventory("DoubleRifleAmmo",1)
		TNT1 A 0 A_JumpIfInventory("Zoomed",1,"Fire2")
        TNT1 A 0 A_PlaySound("weapons/rifle")
		R4FF A 0 A_FireCustomMissile("GunFireSmoke", 0, 0, 0, 0, 0, 0)
        //TNT1 A 0 A_FireCustomMissile("SmokeSpawner",0,0,0,5)
		R4FF A 1 BRIGHT A_AlertMonsters
		//TNT1 A 0 A_FireCustomMissile("YellowFlareSpawn",0,0,0,0)
		TNT1 A 0 A_SpawnItemEx("PlayerMuzzle1",30,5,30)
		R4FF B 1 BRIGHT A_FireBullets (1.5, 1.5, 1, 18, "HitPuff")
        R4FF A 0 A_FireCustomMissile("Tracer", random(-1,1), 0,0, -16, 0, random(-1,1))
		TNT1 A 0 A_JumpIfInventory("NoPenetration", 1, 2)
		R4FF A 0 A_FireCustomMissile("WallPenetrationHitscan", 0, 0, -1, 0, 0, 0)
		TNT1 A 0
        TNT1 A 0 A_SetPitch(-1.8 + pitch)
		//TNT1 A 0 ACS_Execute(373, 0, 0, 0, 0)
		//TNT1 A 0 A_FireCustomMissile("ShakeYourAssMinor", 0, 0, 0, 0)
		//TNT1 A 0 A_FireCustomMissile("YellowFlareSpawn",0,0,0,0)
		TNT1 A 0 A_Takeinventory("RifleAmmo",1)
		TNT1 A 0 A_SetPitch(+0.9 + pitch)
		R4FF C 1 A_FireCustomMissile("RifleCaseSpawn",5,0,6,-14)
        R4FG A 1 A_SetPitch(+0.9 + pitch)
		TNT1 A 0 A_SpawnItem("DistantRifleFireSound")
		R4FG A 0
		TNT1 A 0 A_JumpIfInventory("Kicking",1,"DoKick")
        TNT1 A 0 A_JumpIfInventory("Taunting",1,"Taunt")
		TNT1 A 0 A_JumpIfInventory("Salute1", 1, "Salute")
		TNT1 A 0 A_JumpIfInventory("Salute2", 1, "Salute")
        TNT1 A 0 A_JumpIfInventory("Reloading",1,"Reload")
		R4FG A 0 A_Refire
		R4FG A 5 A_WeaponReady(1)
		Goto Ready+6
	Fire_2:
        TNT1 A 0 A_JumpIfInventory("RifleAmmo",1,2)
        Goto Reload
        TNT1 AAAA 0

		//TNT1 A 0 A_JumpIfInventory("RifleSpread", 5, "FireHighSpread")
		TNT1 A 0 A_Takeinventory("DoubleRifleAmmo",1)
		TNT1 A 0 A_JumpIfInventory("Zoomed",1,"Fire2")
        TNT1 A 0 A_PlaySound("weapons/rifle")
		R4FF A 0 A_FireCustomMissile("GunFireSmoke", 0, 0, 0, 0, 0, 0)
        //TNT1 A 0 A_FireCustomMissile("SmokeSpawner",0,0,0,5)
		R5FF A 1 BRIGHT A_AlertMonsters
		//TNT1 A 0 A_FireCustomMissile("YellowFlareSpawn",0,0,0,0)
		TNT1 A 0 A_SpawnItemEx("PlayerMuzzle1",30,5,30)
		R4FF B 1 BRIGHT A_FireBullets (1.5, 1.5, 1, 16, "HitPuff")
        R4FF A 0 A_FireCustomMissile("Tracer", random(-1,1), 0, -1, -16, 0, random(-1,1))
		TNT1 A 0 A_JumpIfInventory("NoPenetration", 1, 2)
		R4FF A 0 A_FireCustomMissile("WallPenetrationHitscan", 0, 0, -1, 0, 0, 0)
		TNT1 A 0
        TNT1 A 0 A_SetPitch(-1.8 + pitch)
		//TNT1 A 0 ACS_Execute(373, 0, 0, 0, 0)
		//TNT1 A 0 A_FireCustomMissile("ShakeYourAssMinor", 0, 0, 0, 0)
		//TNT1 A 0 A_FireCustomMissile("YellowFlareSpawn",0,0,0,0)
		TNT1 A 0 A_Takeinventory("RifleAmmo",1)
		TNT1 A 0 A_SetPitch(+0.9 + pitch)
		R4FF C 1 A_FireCustomMissile("RifleCaseSpawn",5,0,6,-14)
        R4FG A 1 A_SetPitch(+0.9 + pitch)
		TNT1 A 0 A_SpawnItem("DistantRifleFireSound")
		R4FG A 1
		TNT1 A 0 A_JumpIfInventory("Kicking",1,"DoKick")
        TNT1 A 0 A_JumpIfInventory("Taunting",1,"Taunt")
		TNT1 A 0 A_JumpIfInventory("Salute1", 1, "Salute")
		TNT1 A 0 A_JumpIfInventory("Salute2", 1, "Salute")
        TNT1 A 0 A_JumpIfInventory("Reloading",1,"Reload")
		R4FG A 0 A_Refire
		R4FG A 5 A_WeaponReady(1)
		Goto Ready+6
	Fire_3:
        TNT1 A 0 A_JumpIfInventory("RifleAmmo",1,2)
        Goto Reload
        TNT1 AAAA 0

		//TNT1 A 0 A_JumpIfInventory("RifleSpread", 5, "FireHighSpread")
		TNT1 A 0 A_Takeinventory("DoubleRifleAmmo",1)
		TNT1 A 0 A_JumpIfInventory("Zoomed",1,"Fire2")
        TNT1 A 0 A_PlaySound("weapons/rifle")
		R4FF A 0 A_FireCustomMissile("GunFireSmoke", 0, 0, 0, 0, 0, 0)
        //TNT1 A 0 A_FireCustomMissile("SmokeSpawner",0,0,0,5)
		R6FF A 1 BRIGHT A_AlertMonsters
		//TNT1 A 0 A_FireCustomMissile("YellowFlareSpawn",0,0,0,0)
		TNT1 A 0 A_SpawnItemEx("PlayerMuzzle1",30,5,30)
		R4FF B 1 BRIGHT A_FireBullets (1.5, 1.5, 1, 16, "HitPuff")
        R4FF A 0 A_FireCustomMissile("Tracer", random(-1,1), 0, 0, -16, 0, random(-1,1))
		TNT1 A 0 A_JumpIfInventory("NoPenetration", 1, 2)
		R4FF A 0 A_FireCustomMissile("WallPenetrationHitscan", 0, 0, -1, 0, 0, 0)
		TNT1 A 0
        TNT1 A 0 A_SetPitch(-1.8 + pitch)
		//TNT1 A 0 ACS_Execute(373, 0, 0, 0, 0)
		//TNT1 A 0 A_FireCustomMissile("ShakeYourAssMinor", 0, 0, 0, 0)
		//TNT1 A 0 A_FireCustomMissile("YellowFlareSpawn",0,0,0,0)
		TNT1 A 0 A_Takeinventory("RifleAmmo",1)
		TNT1 A 0 A_SetPitch(+0.9 + pitch)
		R4FF C 1 A_FireCustomMissile("RifleCaseSpawn",5,0,6,-14)
        R4FG A 1 A_SetPitch(+0.9 + pitch)
		TNT1 A 0 A_SpawnItem("DistantRifleFireSound")
		R4FG A 1
		TNT1 A 0 A_JumpIfInventory("Kicking",1,"DoKick")
        TNT1 A 0 A_JumpIfInventory("Taunting",1,"Taunt")
		TNT1 A 0 A_JumpIfInventory("Salute1", 1, "Salute")
		TNT1 A 0 A_JumpIfInventory("Salute2", 1, "Salute")
        TNT1 A 0 A_JumpIfInventory("Reloading",1,"Reload")
		R4FG A 0 A_Refire
		R4FG A 5 A_WeaponReady(1)
		Goto Ready+6
	
      Fire2:
        TNT1 A 0 A_PlaySound("weapons/rifle")
		TNT1 A 0 A_JumpIfInventory("IsFiringAltFireOnFullAuto", 1, "Fire2FullAuto")
        //TNT1 A 0 A_FireCustomMissile("SmokeSpawner",0,0,0,5)
		R42G A 0 A_AlertMonsters
		R4FF A 0 A_FireCustomMissile("GunFireSmoke", 0, 0, 0, 4, 0, 0)
		//TNT1 A 0 A_FireCustomMissile("YellowFlareSpawn",0,0,0,5)
		TNT1 A 0 A_SpawnItemEx("PlayerMuzzle1",30,0,45)
		R42F A 1 BRIGHT A_FireBullets (0.1, 0.1, 1, 18, "HitPuff")
        //R42F A 0 BRIGHT A_FireCustomMissile("Tracer", 0, 0,0, -12)
		TNT1 A 0 A_JumpIfInventory("NoPenetration", 1, 2)
		R4FF A 0 A_FireCustomMissile("WallPenetrationHitscan", 0, 0, -1, -12, 0, 0)
		TNT1 A 0
        //TNT1 A 0 ACS_Execute(373, 0, 0, 0, 0)
		//TNT1 A 0 A_FireCustomMissile("ShakeYourAssMinor", 0, 0, 0, 0)
		TNT1 A 0 A_SetPitch(-0.8 + pitch)
		TNT1 A 0 A_Takeinventory("RifleAmmo",1)
		TNT1 A 0 A_SpawnItem("DistantRifleFireSound")
		R42F B 1 A_WeaponReady(1)
		TNT1 A 0 A_SetPitch(+0.4 + pitch)
		TNT1 A 0 A_FireCustomMissile("RifleCaseSpawn",1,0,8,0)
        R42F C 1 A_WeaponReady(1)
		TNT1 A 0 A_SetPitch(+0.4 + pitch)
		TNT1 A 0 A_GiveInventory("IsFiringAltFireOnFullAuto", 1)
		R42G A 2 A_WeaponReady(1)
        R42F B 0 A_ReFire
		TNT1 A 0 A_TakeInventory("IsFiringAltFireOnFullAuto", 1)
		R42G A 10 A_WeaponReady(1)
        R42G A 0
		Goto Ready2
		
	Fire2FullAuto:
        TNT1 A 0 A_PlaySound("weapons/rifle")
        //TNT1 A 0 A_FireCustomMissile("SmokeSpawner",0,0,0,5)
		R42G A 0 A_AlertMonsters
		//TNT1 A 0 A_FireCustomMissile("YellowFlareSpawn",0,0,0,5)
		R4FF A 0 A_FireCustomMissile("GunFireSmoke", 0, 0, 0, 4, 0, 0)
		TNT1 A 0 A_SpawnItemEx("PlayerMuzzle1",30,0,45)
		R42F A 1 BRIGHT A_FireBullets (0.1, 0.1, -1, 9, "HitPuff")
        R42F A 0 BRIGHT A_FireCustomMissile("Tracer", 0, 0, -1, 0)
        //TNT1 A 0 ACS_Execute(373, 0, 0, 0, 0)
		//TNT1 A 0 A_FireCustomMissile("ShakeYourAssMinor", 0, 0, 0, 0)
		TNT1 A 0 A_SetPitch(-1.0 + pitch)
		TNT1 A 0 A_Takeinventory("RifleAmmo",1)
		R42F B 1
		TNT1 A 0 A_SetPitch(+0.4 + pitch)
		TNT1 A 0 A_FireCustomMissile("RifleCaseSpawn",1,0,8,0)
        R42F C 1
		TNT1 A 0 A_SetPitch(+0.4 + pitch)
		R42G A 2 A_WeaponReady(1)
		TNT1 A 0 A_Refire
        R42F B 0
		TNT1 A 0 A_TakeInventory("IsFiringAltFireOnFullAuto", 1)
		R42G A 10 A_WeaponReady(1)
        R42G A 0
		Goto Ready2	

    AltFire:
        TNT1 A 0
		TNT1 A 0 A_JumpIfInventory("Zoomed",1,"NoAim")
		TNT1 A 0 A_Giveinventory("Zoomed",1)
		TNT1 A 0 A_Giveinventory("GoSpecial",1)
        TNT1 A 0 A_ZoomFactor(1.5)
		TNT1 A 0 A_Giveinventory("ADSmode",1)
		TNT1 A 0 A_SetCrosshair(7)
        R4FZ ABCDEF 1
        Goto Ready2
       NoAim:
        R4FZ FEDCBA 1
		TNT1 A 0 A_SetCrosshair(0)
		TNT1 A 0 A_Takeinventory("Zoomed",1)
        TNT1 A 0 A_ZoomFactor(1.0)
		TNT1 A 0 A_Takeinventory("ADSmode",1)
        Goto Ready+11
		
	NoAmmo:
	R4FG A 1 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 Ready+12
	
    Reload:
	TNT1 A 0 A_SetCrosshair(0)
		R4FG A 1 A_WeaponReady
		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("RifleAmmo",31,64)
        TNT1 A 0 A_JumpIfInventory("Clip2",1,3)
        Goto NoAmmo
        TNT1 AAA 0
		TNT1 A 0 A_Takeinventory("Zoomed",1)
        TNT1 A 0 A_PlaySound("Reload")
		TNT1 A 0 A_GiveInventory ("Pumping", 1)
		TNT1 A 0 A_Takeinventory("Reloading",1)
		TNT1 A 0
        R4FR ABCDE 1  A_JumpIfInventory("Kicking",1,"DoKick")
		TNT1 A 0 A_JumpIfInventory("HasUnloaded", 1, 2)
        R4FR F 1 A_FireCustomMissile("EmptyClipSpawn",-5,0,8,-4)
        R4FR GGGGGGGG 1
		R4FR HIKL 1
		R4FR MMM 1
		R4FR NOPQRST 1 A_JumpIfInventory("Kicking",1,"DoKick")
		TNT1 A 0 A_Takeinventory("HasUnloaded",1)
		TNT1 A 0 A_JumpIfInventory("RifleAmmo",1,"InsertBullets2")//30+1 effect
		
	InsertBullets:
		TNT1 AAAA 0
		TNT1 A 0 A_JumpIfInventory("RifleAmmo",30,15)
		TNT1 A 0 A_JumpIfInventory("Clip2",1,3)
		Goto Ready+6
        TNT1 AAAAAA 0
		TNT1 A 0 A_Giveinventory("RifleAmmo",1)
		TNT1 A 0 A_Giveinventory("DoubleRifleAmmo",1)
		TNT1 A 0 A_Takeinventory("Clip2",1)
		Goto InsertBullets
		
		TNT1 AAAAAAAAAA 0
		TNT1 A 0 A_Takeinventory("Reloading",1)
		
		TNT1 A 0 A_Refire
        Goto Ready+6
		TNT1 AAAA 0
		TNT1 A 0 A_Takeinventory("Reloading",1)
		
		TNT1 A 0 A_Refire
        Goto Ready+6
		
	InsertBullets2:
		TNT1 AAAA 0
		TNT1 A 0 A_JumpIfInventory("RifleAmmo",31,15)
		TNT1 A 0 A_JumpIfInventory("Clip2",1,3)
		Goto Ready+6
        TNT1 AAAAAA 0
		TNT1 A 0 A_Giveinventory("RifleAmmo",1)
		TNT1 A 0 A_Giveinventory("DoubleRifleAmmo",1)
		TNT1 A 0 A_Takeinventory("Clip2",1)
		Goto InsertBullets2
		
		TNT1 AAAAAAAAAA 0
		TNT1 A 0 A_Takeinventory("Reloading",1)
		TNT1 A 0 A_Refire
        Goto Ready+6
		TNT1 AAAA 0
		TNT1 A 0 A_Takeinventory("Reloading",1)
		
		TNT1 A 0 A_Refire
        Goto Ready+6	
		
		
		
		
		
		
		
		
	Unload:
		R4FG 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_JumpIfInventory("RifleAmmo",1,3)
        Goto NoAmmo
        TNT1 AAA 0
		TNT1 A 0 A_Takeinventory("Zoomed",1)
		R4FR TSRQPO 1
        TNT1 A 0 A_PlaySound("Reload")
		TNT1 A 0 A_GiveInventory ("Pumping", 1)
		TNT1 A 0 A_Takeinventory("Unloading",1)
		
	RemoveBullets:
		TNT1 AAAA 0
		TNT1 A 0 A_JumpIfInventory("RifleAmmo",1,3)
		Goto FinishUnload
        TNT1 AAAAAA 0
		TNT1 A 0 A_Takeinventory("RifleAmmo",1)
		TNT1 A 0 A_Takeinventory("DoubleRifleAmmo",1)
		TNT1 A 0 A_Giveinventory("Clip2",1)
		Goto RemoveBullets
	
	FInishUnload:
		R4FR NMLKIGHGFEDCBA 1
		TNT1 A 0 A_PlaySound("DryFire")
		TNT1 A 0 A_GiveInventory("HasUnloaded", 1)
		TNT1 A 0 A_Takeinventory("Unloading",1)
		Goto Ready+6
		
		
		
 	Spawn:
		R4FL A -1
		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 (pitch > 32, "LowKickChecker1")
		Goto InitializeNormalKick
		
		LowKickChecker1:
		TNT1 A 0
	    NULL A 0 A_JumpIf (pitch > 90, "InitializeNormalKick")
		RIFF A 0 A_FireCustomMissile("KickAttackDetectDowned", 0, 0, 0, 0)
		
		InitializeNOrmalKick:
        TNT1 A 0 A_jumpifinventory("PowerStrength",1,"BerserkerKick")
		TNT1 A 0 A_PlaySound("KICK")
		TNT1 A 0 SetPlayerProperty(0,1,0)
		RIKI BCD 1
		RIFF A 0 A_FireCustomMissile("KickAttack", 0, 0, 0, -7)
        RIKI H 5
		KICK A 0 A_Takeinventory("Kicking",1)
		RIKI I 1
		RIKI GFEDCBA 1 
		TNT1 A 0 SetPlayerProperty(0,0,0)
		TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
		Goto Ready+6
    BerserkerKick:
		TNT1 A 0 A_PlaySound("KICK")
		TNT1 A 0 SetPlayerProperty(0,1,0)
		RIKI BCD 1
        RIFF A 0 A_FireCustomMissile("SuperKickAttack", 0, 0, 0, -7)
        RIKI H 5
		KICK A 0 A_Takeinventory("Kicking",1)
		RIKI I 1
		RIKI GFEDCBA 1 
		TNT1 A 0 SetPlayerProperty(0,0,0)
		TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
		Goto Ready+6
	
	AirKick:
	    TNT1 A 0 A_jumpifinventory("PowerStrength",1,"SuperAirKick")
		TNT1 A 0 A_PlaySound("KICK")
		TNT1 A 0 A_Recoil (-6)
		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 Ready+6
		
	SuperAirKick:
		TNT1 A 0 A_PlaySound("KICK")
		TNT1 A 0 A_Recoil (-6)
		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 Ready+6
	
	Taunt:
		TNT1 A 0 A_Takeinventory("Zoomed",1)
        TNT1 A 0 A_ZoomFactor(1.0)
		TNT1 A 0 A_Takeinventory("Taunting",1)
		TNT1 A 0 A_JumpIfInventory("RealismMode", 1, "CheckGrab")
        TNT1 A 10
		FUCK A 1
		TNT1 A 0 BRIGHT A_FireCustomMissile("Taunter", 0, 0, -1, 0)
		TNT1 A 0 BRIGHT A_FireCustomMissile("Taunter", -9, 0, -1, 0)
		TNT1 A 0 BRIGHT A_FireCustomMissile("Taunter", 9, 0, -1, 0)
        FUCK B 1 A_PlaySound("FUCK", 2)
        FUCK CD 1 A_AlertMonsters
		FUCK E 15 A_Takeinventory("Taunting",1)
        FUCK DCBA 1
        TNT1 A 10
		Goto Ready
	Salute:
	    TNT1 A 0 SetPlayerProperty(0,1,0)
		TNT1 A 0 A_ALertMonsters
		SALU ABCDEDCDEDCDEDCBA 4
		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 Ready+6
	CheckDistanceGrab:
	    TNT1 A 0 
		TNT1 A 0 A_JumpIfCloser(100, "Grab")
		Goto Ready+6
	CheckIfCanGrab:
	    TNT1 A 0 
		TNT1 A 0 A_JumpIfInTargetInventory("CanGrab", 1, "Grab")
		Goto Ready+6	
	Grab:
	    PKUP ABC 2
		TNT1 A 0 A_CustomMissile("PickupProjectile")
		PKUP DEF 2
		Goto Ready
	TossGrenade:	
		TNT1 A 0
		TNT1 A 0 A_Takeinventory("Zoomed",1)
        TNT1 A 0 A_ZoomFactor(1.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")
		GRTH EEFG 1
		TNT1 A 0 A_PLaySound ("GRNTOSS")
		GRTH HI 1
		TNT1 A 0 A_TakeInventory("GrenadeAmmo", 1)
		TNT1 A 0 A_FireCustomMissile("HandGrenade", random(-2,2), 0, 0, 0, 0, 0)
	    TNT1 A 0 A_TakeInventory("FiredGrenade", 1)
		GRTH JKLM 1
		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 REady+6
	}
}





ACTOR ClassicShotgun : DoomWeapon
{
	Game Doom
	Weapon.SelectionOrder 2
	Weapon.AmmoUse1 0
	Weapon.AmmoUse2 0
	Weapon.AmmoGive1 4
	Weapon.AmmoGive2 0
	Weapon.AmmoType1 "Shell2"
	Weapon.AmmoType2 "CShotgunAmmo"
	Inventory.PickupMessage "$GOTSHOTGUN"
    Inventory.PickupSound "weapons/sgpump"
	Obituary "$OB_MPSHOTGUN"
    AttackSound "None"
    +WEAPON.NOALERT
    +WEAPON.NOAUTOAIM
	+WEAPON.NOAUTOFIRE
	+FORCEXYBILLBOARD
	+WEAPON.NO_AUTO_SWITCH
	+WEAPON.CHEATNOTWEAPON
	Scale 0.9
	States
	{

    ShakeLeft:
		TNT1 A 0
		TNT1 A 0 A_TakeInventory("ImpactMovesSling")
		TNT1 A 0 A_JumpIfInventory("UseShotgunStrap", 1, 2)
		Goto OkToFire
		TNT1 A 0
		4HTI GH 2 A_WeaponReady
		
		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("TossGrenade",1,"TossGrenade")
		4HTI IJK 2 A_WeaponReady
		TNT1 A 0 A_TakeInventory("ImpactMovesSling")
		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("TossGrenade",1,"TossGrenade")
		ShakeRight:
		TNT1 A 0
		TNT1 A 0 A_TakeInventory("ImpactMovesSling")
		TNT1 A 0 A_JumpIfInventory("UseShotgunStrap", 1, 2)
		Goto OkToFire
		TNT1 A 0
		4HTI ABC 2 A_WeaponReady
	    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("TossGrenade",1,"TossGrenade")
		TNT1 A 0 A_JumpIfInventory("ImpactMovesSling", 1, "ShakeLeft")
		4HTI DEF 2 A_WeaponReady
	    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("TossGrenade",1,"TossGrenade")
		TNT1 A 0 A_JumpIfInventory("ImpactMovesSling", 1, "ShakeLeft")
	    4HTI GHK 2 A_WeaponReady
		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("TossGrenade",1,"TossGrenade")
	    4HTI ABEF 2 A_WeaponReady
		Goto Ready+14
		
	ShakeAiming:
		TNT1 A 0
		TNT1 A 0 A_TakeInventory("ImpactMovesSling")
		TNT1 A 0 A_JumpIfInventory("UseShotgunStrap", 1, 2)
		Goto Ready2
		TNT1 A 0
		4T81 ABCBA 2 A_WeaponReady
		TNT1 A 0 A_TakeInventory("ImpactMovesSling")
		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("TossGrenade",1,"TossGrenade")
		4T81 DEFED 2 A_WeaponReady
	    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("TossGrenade",1,"TossGrenade")
	    4T81 AB 2 A_WeaponReady
		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("TossGrenade",1,"TossGrenade")
	    4T81 DE 2 A_WeaponReady
		Goto Ready2
		
	Steady:
		TNT1 A 1
		Goto Ready
	Ready:
        TNT1 AAAA 0 A_JumpIfInventory("GoFatality", 1, "Steady")
		TNT1 A 0 A_JumpIfInventory("NeverSelectedShotgun",1,"WarmUp")
        TNT1 A 4 A_PlaySound("weapons/sgpump")
		4HTG CBA 0
        4HSS ABCD 1 A_JumpIfInventory("GoFatality", 1, "Steady")
		Goto ShakeRight
        TNT1 AAAAAAAAAAAAAAA 0
        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("Unloading",1,"Unload")
		TNT1 A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
		TNT1 A 0 A_JumpIfInventory("ImpactMovesSling", 1, "ShakeLeft")
	OkToFire:
		4HTG A 1 A_WeaponReady
		TNT1 A 0 A_TakeInventory("Shot_Gun")
		TNT1 A 0 A_TakeInventory("Auto_ShotGun")
		TNT1 A 0 A_TakeInventory("SMG")
		TNT1 A 0 A_TakeInventory("DMR")
		TNT1 A 0 A_TakeInventory("CyberRocket_Launcher")
		Goto Ready+14
		
	Ready2:
        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("TossGrenade",1,"TossGrenade")
		TNT1 A 0 A_JumpIfInventory("ImpactMovesSling", 1, "ShakeAiming")
		TNT1 A 0 A_JumpIfInventory("Unloading",1,"Unload")
		4HT8 A 1 A_WeaponReady(WRF_nobob)
		Loop
	
	
	Deselect:
			TNT1 A 0
			TNT1 A 0 A_Takeinventory("Zoomed",1)
			TNT1 A 0 A_TakeInventory("TossGrenade", 1)
			TNT1 A 0 A_Takeinventory("ADSmode",1)
		TNT1 A 0 A_Takeinventory("UseShotgunStrap",1)
        TNT1 A 0 A_ZoomFactor(1.0)
		4HSS DCBA 1
		TNT1 AAAAAAAAAAAAAAAAAA 0 A_Lower
		TNT1 A 1
		Wait
	
	Select:
		TNT1 A 0 A_Takeinventory("FistsSelected",1)
		TNT1 A 0 A_Takeinventory("SawSelected",1)
		TNT1 A 0 A_Giveinventory("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 AAAAAAAAAAAAAAAAAAAAAAA 0 A_Raise
		Goto Ready
		
    Fire:
        TNT1 A 0 A_Takeinventory("Reloading",1)
		TNT1 A 0 A_JumpIfInventory("Zoomed",1,"Fire2")
        TNT1 A 0 A_JumpIfInventory("CShotgunAmmo",1,2)
        Goto Reload
        TNT1 AAAA 0
		TNT1 A 0 A_JumpIfInventory("ShotgunWasEmpty", 1, "Pump2")
        //TNT1 AA 0 A_FireCustomMissile("SmokeSpawner",0,0,0,5)
		//TNT1 A 0 A_SetAngle(random(2, -2) + angle)
		//TNT1 A 0 A_SetPitch(random(2, -2) + pitch)
        TNT1 A 0 A_AlertMonsters
        TNT1 A 0 A_PlaySound("weapons/sg", 1)
		RIFF AA 0 A_FireCustomMissile("GunFireSmoke", 0, 0, 0, 0, 0, 0)
        TNT1 A 0
		TNT1 A 0 A_SpawnItemEx("PlayerMuzzle1",30,5,30)
		//TNT1 AAAAAAAAAAAA 0 BRIGHT A_FireCustomMissile("ShotgunParticles", random(-15,15), 0, -1, 0, 0, random(-10,10))
		TNT1 AAA 0 A_FireCustomMissile("Tracer", random(-2,2), 0, 0, -16, 0, random(-2,2))
		//RIFF AAAAAA 0 A_FireCustomMissile("WallPenetrationHitscan", random(-3,3), 0, -1, 0, 0, random(-3,3))
        //TNT1 A 0 ACS_Execute(374, 0, 0, 0, 0)
		//TNT1 A 0 A_FireCustomMissile("ShakeYourAssDouble", 0, 0, 0, 0)
		TNT1 A 0 A_Takeinventory("CShotgunAmmo",1)
		4HTF A 1 A_FireBullets (2.2, 2.2, 8, 18, "ShotgunPuff")
		TNT1 A 0 A_SetPitch(-8.0 + pitch)
        4HTF B 1 BRIGHT
		
		
		4HTF C 1 A_SetPitch(+1.0 + pitch)
		
		4HTF DE 1 A_SetPitch(+1.0 + pitch)
		
		
		4HTG A 1 A_SetPitch(+3.0 + pitch)
		4HTG A 1 A_SetPitch(+1.0 + pitch)
		
		//TNT1 A 0 A_Jump(128, "Pump1")
		Goto Pump1
		
   Pump1:	
   TNT1 A 0 A_GiveInventory ("Pumping", 1)
   
   4HTG BCDEFG 1
   TNT1 A 0 A_FireCustomMissile("ShotCaseSpawn",0,0,-4,-4)
   4HTG H 1 A_PlaySound("weapons/sgpump", 3)
   //TNT1 A 0 A_SetPitch(+1 + pitch)
   4HTG IJ 1
   //TNT1 A 0 A_SetPitch(-1 + pitch)
   4HTG KL 1
   4HTG KJIH 1
   TNT1 A 0 A_Takeinventory("ShotgunWasEmpty",1)
   4HTG GFEDC 1 A_JumpIfInventory("Kicking",1,"DoKick")
   Goto ReadyToFireAgain
   
   
   Pump2:	
   TNT1 A 0 A_GiveInventory ("Pumping", 1)
   TNT1 A 0 A_TakeInventory("Reloading", 1)
	    TNT1 A 0 A_Takeinventory("Zoomed",1)
        TNT1 A 0 A_ZoomFactor(1.0)
   4HTG FG 1
   4HTG H 1 A_PlaySound("weapons/sgpump", 3)
   //TNT1 A 0 A_SetPitch(+1 + pitch)
   4HTG IJ 1
   //TNT1 A 0 A_SetPitch(-1 + pitch)
   4HTG KL 1
   4HTG KJIH 1
   TNT1 A 0 A_Takeinventory("ShotgunWasEmpty",1)
   4HTG GFEDC 1 A_JumpIfInventory("Kicking",1,"DoKick")
   Goto ReadyToFireAgain
   
		
	ReadyToFireAgain:	
   //4HTG A 6 <-- Old frame
        4HTG A 1 Offset(10,36) // <-- New frames
        4HTG A 1 Offset(9,40) //
        4HTG A 1 Offset(4,40) //
        4HTG A 1 Offset(0,32) //
        4HTG A 0 A_Refire
        4HTG A 0 //A_Refire
		Goto ShakeLeft
		
	Fire2:
        TNT1 A 0 A_Takeinventory("Reloading",1)
        TNT1 A 0 A_JumpIfInventory("CShotgunAmmo",1,2)
        Goto Reload
        TNT1 AAAA 0
		TNT1 A 0 A_JumpIfInventory("ShotgunWasEmpty", 1, "Pump2")
        //TNT1 AA 0 A_FireCustomMissile("SmokeSpawner",0,0,0,5)
        TNT1 A 0 A_AlertMonsters
		RIFF AA 0 A_FireCustomMissile("GunFireSmoke", 0, 0, 0, 2, 0, 0)
        TNT1 A 0 A_PlaySound("weapons/sg", 1)
        TNT1 A 0
		TNT1 A 0 A_SpawnItemEx("PlayerMuzzle1",30,0,45)
		4HTG A 0 A_FireBullets (1.2, 1.2, 8, 18, "ShotgunPuff")
		//TNT1 AAAAAAAAAAAA 0 BRIGHT A_FireCustomMissile("ShotgunParticles", random(-15,15), 0, -1, 0, 0, random(-10,10))
		//TNT1 AAAAA 0 A_FireCustomMissile("Tracer", random(-1,1), 0, 0, -12, 0, random(-1,1))
		TNT1 A 0 A_SetPitch(-12.0 + pitch)
		//TNT1 A 0 A_FireCustomMissile("ShakeYourAssDouble", 0, 0, 0, 0)
		TNT1 A 0 A_Takeinventory("CShotgunAmmo",1)
        4HT8 FF 1 BRIGHT A_SetPitch(+2.0 + pitch)
		4HT8 GGAA 1 A_SetPitch(+2.0 + pitch)
TNT1 A 0 A_ZoomFactor(1.0)
        4HT8 ADE 2	
   TNT1 A 0 A_GiveInventory ("Pumping", 1)
   4HTG BCDEFG 1
   TNT1 A 0 A_FireCustomMissile("ShotCaseSpawn",0,0,-4,-4)
   4HTG H 1 A_PlaySound("weapons/sgpump")
   4HTG IJKL 1 
        TNT1 A 0 A_JumpIfInventory("Kicking",1,"DoKick")
        4HTG KJIHGFEDCB 1
TNT1 A 0 A_ZoomFactor(1.2)
4HT8 ED 1
TNT1 A 0 A_Refire
		Goto ShakeAiming
	
	
	
	
	AltFire:
        TNT1 A 0 A_setcrosshair(7)
		TNT1 A 0 A_JumpIfInventory("Zoomed",1,8)
		TNT1 A 0 A_Giveinventory("Zoomed",1)
        TNT1 A 0 A_ZoomFactor(1.2)
		TNT1 A 0 A_Giveinventory("ADSmode",1)
        4HT8 E 1
        Goto ShakeAiming
        TNT1 AAAAAA 0
        4HT8 D 1 A_setcrosshair(0)
		TNT1 A 0 A_Takeinventory("Zoomed",1)
        TNT1 A 0 A_ZoomFactor(1.0)
		TNT1 A 0 A_Takeinventory("ADSmode",1)
        Goto Ready+12
		
	WarmUp:
	TNT1 A 0
	TNT1 A 0 A_TakeInventory ("NeverSelectedShotgun", 1)
   TNT1 A 0 A_TakeInventory("Reloading", 1)
	    TNT1 A 0 A_Takeinventory("Zoomed",1)
        TNT1 A 0 A_ZoomFactor(1.0)
	4HSS EFGHIJKLM 1
   4HTG FG 1
   4HTG H 1 A_PlaySound("weapons/sgpump", 3)
   //TNT1 A 0 A_SetPitch(+1 + pitch)
   4HTG IJ 1
   //TNT1 A 0 A_SetPitch(-1 + pitch)
   4HTG KL 1
   4HTG KJIH 1
   TNT1 A 0 A_Takeinventory("ShotgunWasEmpty",1)
   4HTG GFEDC 1 A_JumpIfInventory("Kicking",1,"DoKick")
   Goto ReadyToFireAgain	
	
	Spawn:
		4HTC A -1
		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 (pitch > 32, "LowKickChecker1")
		Goto InitializeNormalKick
		
		LowKickChecker1:
		TNT1 A 0
	    NULL A 0 A_JumpIf (pitch > 90, "InitializeNormalKick")
		RIFF A 0 A_FireCustomMissile("KickAttackDetectDowned", 0, 0, 0, 0)
		
		InitializeNOrmalKick:
        TNT1 A 0 A_jumpifinventory("PowerStrength",1,"BerserkerKick")
		TNT1 A 0 A_PlaySound("KICK")
		TNT1 A 0 SetPlayerProperty(0,1,0)
		shki BCD 1
		RIFF A 0 A_FireCustomMissile("KickAttack", 0, 0, 0, -7)
        shki H 5
		KICK A 0 A_Takeinventory("Kicking",1)
		shki I 1
		shki GFEDCBA 1 
		TNT1 A 0 SetPlayerProperty(0,0,0)
		TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
		Goto Ready+14
    BerserkerKick:
		TNT1 A 0 A_PlaySound("KICK")
		TNT1 A 0 SetPlayerProperty(0,1,0)
		shki BCD 1
        RIFF A 0 A_FireCustomMissile("SuperKickAttack", 0, 0, 0, -7)
        shki H 5
		KICK A 0 A_Takeinventory("Kicking",1)
		shki I 1
		shki GFEDCBA 1 
		TNT1 A 0 SetPlayerProperty(0,0,0)
		TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
		Goto Ready+14
	
	AirKick:
	    TNT1 A 0 A_jumpifinventory("PowerStrength",1,"SuperAirKick")
		TNT1 A 0 A_PlaySound("KICK")
		TNT1 A 0 A_Recoil (-6)
		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 Ready+14
		
	SuperAirKick:
		TNT1 A 0 A_PlaySound("KICK")
		TNT1 A 0 A_Recoil (-6)
		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 Ready+14
	
	Taunt:
		TNT1 A 0 A_Takeinventory("Zoomed",1)
        TNT1 A 0 A_ZoomFactor(1.0)
		TNT1 A 0 A_Takeinventory("Taunting",1)
		TNT1 A 0 A_JumpIfInventory("RealismMode", 1, "CheckGrab")
        TNT1 A 10
		FUCK A 1
		TNT1 A 0 BRIGHT A_FireCustomMissile("Taunter", 0, 0, -1, 0)
		TNT1 A 0 BRIGHT A_FireCustomMissile("Taunter", -9, 0, -1, 0)
		TNT1 A 0 BRIGHT A_FireCustomMissile("Taunter", 9, 0, -1, 0)
        FUCK B 1 A_PlaySound("FUCK", 2)
        FUCK CD 1 A_AlertMonsters
		FUCK E 15 A_Takeinventory("Taunting",1)
        FUCK DCBA 1
        TNT1 A 10
		Goto Ready
	Salute:
	    TNT1 A 0 SetPlayerProperty(0,1,0)
		TNT1 A 0 A_ALertMonsters
		SALU ABCDEDCDEDCDEDCBA 4
		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 Ready+14
	CheckDistanceGrab:
	    TNT1 A 0 
		TNT1 A 0 A_JumpIfCloser(100, "Grab")
		Goto Ready+14
	CheckIfCanGrab:
	    TNT1 A 0 
		TNT1 A 0 A_JumpIfInTargetInventory("CanGrab", 1, "Grab")
		Goto Ready+14	
	Grab:
	    PKUP ABC 2
		TNT1 A 0 A_CustomMissile("PickupProjectile")
		PKUP DEF 2
		Goto Ready


    ReloadWithNoAmmoLeft:
    Reload:
	    TNT1 A 0
	    TNT1 A 0
		TNT1 A 0 A_TakeInventory("Reloading", 1)
	    TNT1 A 0 A_Takeinventory("Zoomed",1)
        TNT1 A 0 A_ZoomFactor(1.0)
		4HTG A 1 A_WeaponReady
		
		TNT1 A 0 A_JumpIfInventory("CShotgunAmmo",8,"OkToFire")
		TNT1 A 0 A_JumpIfInventory("CShotgunAmmo", 1, "ReloadNormally")
		TNT1 A 0 A_GiveInventory("ShotgunWasEmpty", 1)
	ReloadNormally:	
        TNT1 A 0 A_JumpIfInventory("Shell2",1,3)
        Goto Ready+14
        TNT1 AAA 0
		4HTG B 1 //A_PlaySound("weapons/sgpump")
				TNT1 A 0 A_GiveInventory ("Pumping", 1)
		4HTG CDE 1

        TNT1 AAAA 0
        TNT1 A 0 A_JumpIfInventory("Shell2",1,2)
        Goto Reload+53
        TNT1 AAAAA 0


		TNT1 A 0 A_GiveInventory ("Pumping", 1)
        TNT1 A 0 A_JumpIfInventory("CShotgunAmmo",8,23)
		//TNT1 A 0 A_JumpIfInventory("Shell2",0,23)
        TNT1 A 0
        TNT1 A 0 A_Giveinventory("CShotgunAmmo",1)
		TNT1 A 0 A_Takeinventory("Shell2",1)


        4SHR ABC 1
        4SHR D 1 A_PlaySound("insertshell")
        4SHR EFG 1
        4SHR A 1 A_Refire
        TNT1 A 0 A_JumpIfInventory("Kicking",1,"DoKick")


        Goto Reload+18
        TNT1 AAAAA 0
		TNT1 A 0 A_Takeinventory("Reloading",1)
		TNT1 AAAAA 0
		TNT1 A 0 A_JumpIfInventory("ShotgunWasEmpty", 1, "Pump2")
		4HTG FEDCBA 1 A_WeaponReady
		TNT1 A 0 A_Takeinventory("Reloading",1)
		TNT1 A 0 //A_Giveinventory("SGFullReloaded",1)
		Goto ShakeLeft
		
      PuristGun:
		TNT1 A 1
		TNT1 A 0 A_GiveInventory("ClassicShotgun", 1)
		TNT1 A 0 A_TakeInventory("Shot_Gun", 1)
		TNT1 A 10
		Goto Ready2
		
	TossGrenade:	
		TNT1 A 0
		TNT1 A 0 A_Takeinventory("Zoomed",1)
        TNT1 A 0 A_ZoomFactor(1.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")
		GRTH EEFG 1
		TNT1 A 0 A_PLaySound ("GRNTOSS")
		GRTH HI 1
		TNT1 A 0 A_TakeInventory("GrenadeAmmo", 1)
		TNT1 A 0 A_FireCustomMissile("HandGrenade", random(-2,2), 0, 0, 0, 0, 0)
	    TNT1 A 0 A_TakeInventory("FiredGrenade", 1)
		GRTH JKLM 1
		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 OkToFire	
		
		
	Unload:
		4HTG A 1
		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_GiveInventory("ShotgunWasEmpty", 1)
        TNT1 A 0 A_JumpIfInventory("CShotgunAmmo",1,3)
        Goto OkToFire
        TNT1 AAA 0
		TNT1 A 0 A_Takeinventory("Zoomed",1)
		TNT1 A 0 A_GiveInventory ("Pumping", 1)
		TNT1 A 0 A_Takeinventory("Unloading",1)
		4HTG ABCDEF 1
		
	RemoveBullets:
		TNT1 AAAA 0
		TNT1 A 0 A_JumpIfInventory("CShotgunAmmo",1,3)
		Goto FinishUnload
        TNT1 AAAAAA 0
		TNT1 A 0 A_Takeinventory("CShotgunAmmo",1)
		TNT1 A 0 A_Giveinventory("Shell2",1)
		
		4HTG G 1
	   4HTG H 1 A_PlaySound("weapons/sgpump", 3)
	   //TNT1 A 0 A_SetPitch(+1 + pitch)
	   4HTG IJ 1
	   //TNT1 A 0 A_SetPitch(-1 + pitch)
	   4HTG KL 1
	   4HTG KJIH 1
	   TNT1 A 0 A_Giveinventory("ShotgunWasEmpty",1)
	   4HTG GF 1
		Goto RemoveBullets
	
	FInishUnload:
		4HTG EDCBA 1
		TNT1 A 0 A_Takeinventory("Unloading",1)
		Goto OkToFire	
	}
}




ACTOR ClassicSSG : DoomWeapon
{
	Game Doom
	SpawnID 33
   Weapon.Kickback 50
	Weapon.SelectionOrder 400
	Weapon.AmmoGive1 4
	Weapon.AmmoGive2 0
	Weapon.AmmoType1 "Shell2"
	Weapon.AmmoType2 "SSGAmmo"
	Weapon.AmmoUse1 0
	Weapon.AmmoUse2 0
    +WEAPON.NOAUTOAIM
	+WEAPON.NOAUTOFIRE
	+FORCEXYBILLBOARD
	+WEAPON.CHEATNOTWEAPON
	+WEAPON.NO_AUTO_SWITCH
	Inventory.PickupMessage "$GOTSHOTGUN2"
	Obituary "$OB_MPSSHOTGUN"
    Inventory.PickupSound "CLIPINSS"
	Scale 0.9
	States
	{
	Steady:
	TNT1 A 1
	Goto Ready
	Ready:
        TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
        5HT5 ABCD 0 A_JumpIfInventory("GoFatality", 1, "Steady")
        TNT1 AAA 0
        TNT1 A 0 A_JumpIfInventory("Kicking",1,"DoKick")
        TNT1 A 0 A_JumpIfInventory("Taunting",1,"Taunt")
		TNT1 A 0 A_JumpIfInventory("Salute1", 1, "Salute")
		TNT1 A 0 A_JumpIfInventory("Salute2", 1, "Salute")
		TNT1 A 0 A_JumpIfInventory("Reloading",1,"Reload")
		TNT1 A 0 A_JumpIfInventory("Unloading",1,"Unload")
		
        TNT1 AAA 0
		5HT2 A 1 A_WeaponReady
		TNT1 A 0 A_TakeInventory("SSG")
		TNT1 A 0 A_TakeInventory("Rifle")
		TNT1 A 0 A_TakeInventory("DualRifles")
		TNT1 A 0 A_TakeInventory("SMG")
		TNT1 A 0 A_TakeInventory("DMR")
		TNT1 A 0 A_TakeInventory("CyberRocket_Launcher")
		TNT1 A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")		
		Goto Ready+7
		
	Deselect:
		TNT1 A 0 A_Takeinventory("Zoomed",1)
        TNT1 A 0 A_ZoomFactor(1.0)
		TNT1 A 0 A_TakeInventory("TossGrenade", 1)
		5HT5 DCBA 1
		TNT1 AAAAAAAAAAAAAAAAAA 0 A_Lower
		TNT1 A 1
		Wait
	Select:
		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_Giveinventory("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 AAAAAAAAAAAA 0 A_Raise
		
		5HT2 U 1 Offset(20,46)
		5HT2 V 1 Offset(1,33)
        
		TNT1 A 0 A_GiveInventory ("Pumping", 1)
        TNT1 A 0 A_PlaySound("weapons/sshotc")
        5HT2 WX 1
		5HT2 YZ 1
		TNT1 A 0 A_PlaySound("CLIPINSS")
		TNT1 A 0 A_GiveInventory ("Pumping", 1)
        5HO9 DE 1
		5HO9 FG 1
		Goto Ready
		
    NoAmmo:
        5HT2 A 4 A_PlaySound("weapons/empty", 2)
		TNT1 A 0 A_TakeInventory("SSGAlt",1)
		TNT1 A 0 A_JumpIfInventory("Shell2", 1, "Reload")
        Goto Ready+6
	 Fire:
		TNT1 A 0 A_TakeInventory("Reloading",1)
		TNT1 A 0 A_JumpIfInventory("SSGAlt",1,"AltFire")
		TNT1 A 0 A_JumpIfInventory("SSGAmmo", 2, 1)
		Goto NoAmmo
		//TNT1 A 0 A_JumpIfInventory("SSGAmmo", 2, 1)
		//Goto AltFire
		
		TNT1 A 0 A_TakeInventory("SSGAmmo", 2)
		
		TNT1 A 0 A_Recoil(5)
		5HO9 A 0 A_firebullets (0,0,1,15,"shotpuff",0,180)
        5HO9 A 1 BRIGHT A_playsound("SSHFIRE", 5)
		TNT1 AAAAAAAAAAA 0 A_FireCustomMissile("Tracer", random(-10,10), 0, -1, -12, 0, random(-5,5))
		
		 TNT1 AA 0 A_FireCustomMissile("YellowFlareSpawn",15,0,0,0)
		 TNT1 AA 0 A_FireCustomMissile("YellowFlareSpawn",-15,0,0,0)
		 TNT1 A 0 A_SpawnItemEx("PlayerMuzzle2",30,5,27)
		5HO9 B 1 BRIGHT
		TNT1 A 0 A_FireBullets (12, 6, 10, 7, "ShotgunPuff")
		TNT1 A 0 A_FireBullets (12, 6, 10, 7, "ShotgunPuff")
		TNT1 A 0 A_SetPitch(-16.0 + pitch)
        TNT1 A 0 A_FireCustomMissile("ShakeYourAssQuad", 0, 0, 0, 0)
        5HO9 B 1 BRIGHT A_SetPitch(+2.0 + pitch)
      5HO8 C 1 Offset(0,62)
	  TNT1 A 0 A_SetPitch(+2.0 + pitch)
      5HO8 D 1 Offset(0,61)
	  TNT1 A 0 A_SetPitch(+2.0 + pitch)
      5HO8 E 1 Offset(0,60)
	  TNT1 A 0 A_SetPitch(+2.0 + pitch)
		RIFF AA 0 A_FireCustomMissile("GunFireSmokE", 0, 0, 2, 0, 0, 0)
		RIFF AA 0 A_FireCustomMissile("GunFireSmoke", 0, 0, -2, 0, 0, 0)
      TNT1 A 0 A_TakeInventory("SSGAlt",1)
      TNT1 A 0 A_TakeInventory("Reloading",1)
      //TNT1 A 0 A_JumpIfInventory("Shell2",0,"NoAmmo")
        5HO8 E 2 Offset(0,56) //A_FireCustomMissile("SmokeSpawner",0,0,0,5)
		TNT1 A 0 A_SetPitch(+2.0 + pitch)
        5HO8 C 2 Offset(0,42) //A_FireCustomMissile("SmokeSpawner",0,0,0,5)
		TNT1 A 0 A_SetPitch(+2.0 + pitch)
        5HT2 A 3 A_SetPitch(+2.0 + pitch)
		TNT1 A 0 A_SetPitch(+2.0 + pitch)
		Goto Reload
		
		
		
		
		
	Reload:	
		TNT1 A 0
		
		TNT1 A 0 A_TakeInventory("Reloading",1)
		
		
		TNT1 A 0 A_JumpIfInventory("SSGAlt", 1, "Reload2")//Check if still has a shell on left barrel
		
		TNT1 A 0 A_JumpIfInventory("SSGAmmo", 2, "Ready")//Check if still has a shell on left barrel
		
		
		TNT1 A 0 A_JumpIfInventory("Shell2", 1, 1)//Check if has any ammo left to reload
		Goto Ready
		
		
		TNT1 A 0 A_JumpIfInventory("Shell2", 2, 1)//Check if has ammo to reload 2 shells
		Goto Reload2
		
	
		
		
		//Reload 2 barrels
		5HT2 B 2 Offset(20,48) //A_FireCustomMissile("SmokeSpawner",0,0,0,5)
        5HT2 B 2 Offset(10,36) //A_FireCustomMissile("SmokeSpawner",0,0,0,5)
		5HT2 BCDEF 1
		5HT2 GH 1
		5HT2 IJ 1
		TNT1 A 0 A_GiveInventory ("Pumping", 1)
        
        TNT1 A 0 A_PlaySound("weapons/sshotc")
		TNT1 A 0 A_JumpIfInventory("HasUnloaded", 1, 3)
		TNT1 AA 0 A_FireCustomMissile("SSGCaseSpawner",0,0,-10)
        5HT2 K 2
		5HT2 L 10
		5HT2 MMNNOO 1
        TNT1 A 0 A_playsound("weapons/sshotl")
		  5HT2 P 1 Offset(10,36)
		  5HT2 P 1 Offset(20,46)
		  5HT2 Q 1 Offset(30,56)
		  5HT2 Q 1 Offset(40,66)
		  5HT2 R 1 Offset(50,76)
		  5HT2 S 2
		  TNT1 A 0 A_GiveInventory ("Pumping", 1)
			
		5HT2 T 1 Offset(30,56)
		5HT2 U 1 Offset(20,46)
		5HT2 V 1 Offset(1,33)
			
		TNT1 A 0 A_GiveInventory ("Pumping", 1)
		TNT1 A 0 A_PlaySound("weapons/sshotc")
		TNT1 A 0 A_TakeInventory("Shell2", 2)
		TNT1 A 0 A_GiveInventory("SSGAmmo", 2)
			
			5HT2 WX 1
			5HT2 YZ 1
		  TNT1 A 0 A_GiveInventory ("Pumping", 1)
		  TNT1 A 0 A_TakeInventory("SSGAlt",1)
			5HO9 DE 1
			5HO9 FG 1
		  TNT1 A 0 A_ReFire
		 5HT2 A 2
        Goto Ready+7
		

AltFire:
		TNT1 A 0 A_TakeInventory("Reloading",1)
		TNT1 A 0 A_JumpIfInventory("SSGAmmo",1,3)
        Goto NoAmmo
        TNT1 AAAAA 0
		TNT1 A 0 A_JumpIfInventory("SSGAlt",1,"AltFire2")


		TNT1 A 0 A_TakeInventory("SSGAmmo",1)
		TNT1 A 0 A_GiveInventory("SSGAlt",1)
        TNT1 A 0 A_Recoil(2)
        TNT1 A 0 A_ALertMonsters
		RIFF AA 0 A_FireCustomMissile("GunFireSmoke", 0, 0, 2, 0, 0, 0)
        5HTA A 1 BRIGHT A_PlaySound("weapons/sg")
		TNT1 A 0 A_SpawnItemEx("PlayerMuzzle1",30,5,30)
        5HTA A 2 BRIGHT A_FireBullets (9, 6, 10, 7, "ShotgunPuff")
        TNT1 AAAAA 0 A_FireCustomMissile("Tracer", random(-5,5), 0, -1, -12, 0, random(-5,5))
	TNT1 A 0 A_SetPitch(-4.0 + pitch)
		//TNT1 A 0 A_FireCustomMissile("ShakeYourAssDouble", 0, 0, 0, 0)
		5HO8 EE 1 A_SetPitch(+1.0 + pitch)
        5HT2 AA 1 A_SetPitch(+1.0 + pitch)
        TNT1 A 0
        Goto Ready+6

AltFire2:
		TNT1 A 0 A_TakeInventory("SSGAmmo", 1)
        TNT1 A 0 A_Recoil(2)
        TNT1 A 0 A_ALertMonsters
		RIFF AA 0 A_FireCustomMissile("GunFireSmoke", 0, 0, -2, 0, 0, 0)
        5HTA B 1 BRIGHT A_PlaySound("weapons/sg")
		TNT1 A 0 A_SpawnItemEx("PlayerMuzzle1",30,5,30)
        5HTA B 2 BRIGHT A_FireBullets (9, 6, 10, 7, "ShotgunPuff")
        TNT1 AAAAA 0 A_FireCustomMissile("Tracer", random(-5,5), 0, -1, -12, 0, random(-5,5))
		 TNT1 A 0 A_SetPitch(-4.0 + pitch)
		//TNT1 A 0 A_FireCustomMissile("ShakeYourAssDouble", 0, 0, 0, 0)
        5HT2 AA 1 BRIGHT A_SetPitch(+1.0 + pitch)
		5HO8 EE 1 A_SetPitch(+1.0 + pitch)
		
		TNT1 A 0 A_TakeInventory("SSGAlt", 1)
		TNT1 A 0 A_JumpIfInventory("Shell2",1,1)
		TNT1 A 0 A_GiveInventory("Reloading", 1)
		Goto Ready
        
	Reload2:
		
		TNT1 A 0 A_TakeInventory("Reloading",1)
		TNT1 A 0 A_JumpIfInventory("Shell2",1,1)
		Goto NoAmmo
		TNT1 A 0 A_TakeInventory("SSGAlt",1)
		
		5HT2 B 2 Offset(20,48) //A_FireCustomMissile("SmokeSpawner",0,0,0,5)
		TNT1 A 0 
	    TNT1 A 0 
        5HT2 B 2 Offset(10,36) //A_FireCustomMissile("SmokeSpawner",0,0,0,5)
		TNT1 A 0 
	    TNT1 A 0 
		5HT2 BCDEF 1
		TNT1 A 0 
	    TNT1 A 0 
		5HT2 GH 1
		TNT1 A 0 
	    TNT1 A 0 
		5HT2 IJ 1
		TNT1 A 0
	    TNT1 A 0
		
		TNT1 A 0 A_GiveInventory ("Pumping", 1)
        
        TNT1 A 0 A_PlaySound("weapons/sshotc")
		TNT1 A 0 A_FireCustomMissile("SSGCaseSpawner",0,0,-10)
        5HT2 K 2
		5HT7 L 10
		SHT7 MMNNOO 1
        TNT1 A 0 A_playsound("weapons/sshotl")
		5HT7 P 1 Offset(10,36)
		5HT7 P 1 Offset(20,46)
		5HT2 Q 1 Offset(30,56)
		5HT2 Q 1 Offset(40,66)
		5HT2 R 1 Offset(50,76)
		TNT1 A 0
		5HT2 S 2
		TNT1 A 0 A_GiveInventory ("Pumping", 1)
        
		5HT2 T 1 Offset(30,56)
		5HT2 U 1 Offset(20,46)
		5HT2 V 1 Offset(1,33)
        
		TNT1 A 0 A_GiveInventory ("Pumping", 1)
        TNT1 A 0 A_PlaySound("weapons/sshotc")
		TNT1 A 0 A_TakeInventory("Shell2", 1)
		TNT1 A 0 A_GiveInventory("SSGAmmo", 1)
        5HT2 WX 1
		5HT2 YZ 1
		TNT1 A 0 A_GiveInventory ("Pumping", 1)
		5HO9 DE 1
		5HO9 FG 1
		TNT1 A 0 A_ReFire
		5HT2 A 2
		
	  Goto Ready+7

	Spawn:
		SGN2 A -1
		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 (pitch > 32, "LowKickChecker1")
		Goto InitializeNormalKick
		
		LowKickChecker1:
		TNT1 A 0
	    NULL A 0 A_JumpIf (pitch > 90, "InitializeNormalKick")
		RIFF A 0 A_FireCustomMissile("KickAttackDetectDowned", 0, 0, 0, 0)
		
		InitializeNOrmalKick:
        TNT1 A 0 A_jumpifinventory("PowerStrength",1,"BerserkerKick")
		TNT1 A 0 A_PlaySound("KICK")
		TNT1 A 0 SetPlayerProperty(0,1,0)
		5SKI BCD 1
		RIFF A 0 A_FireCustomMissile("KickAttack", 0, 0, 0, -7)
        5SKI H 5
		KICK A 0 A_Takeinventory("Kicking",1)
		5SKI I 1
		5SKI GFEDCBA 1 
		TNT1 A 0 SetPlayerProperty(0,0,0)
		TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
		Goto Ready+6
    BerserkerKick:
		TNT1 A 0 A_PlaySound("KICK")
		TNT1 A 0 SetPlayerProperty(0,1,0)
		5SKI BCD 1
        RIFF A 0 A_FireCustomMissile("SuperKickAttack", 0, 0, 0, -7)
        5SKI H 5
		KICK A 0 A_Takeinventory("Kicking",1)
		5SKI I 1
		5SKI GFEDCBA 1 
		TNT1 A 0 SetPlayerProperty(0,0,0)
		TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
		Goto Ready+6
	
	AirKick:
	    TNT1 A 0 A_jumpifinventory("PowerStrength",1,"SuperAirKick")
		TNT1 A 0 A_PlaySound("KICK")
		TNT1 A 0 A_Recoil (-6)
		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 Ready+6
		
	SuperAirKick:
		TNT1 A 0 A_PlaySound("KICK")
		TNT1 A 0 A_Recoil (-6)
		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 Ready+6
	
	Taunt:
		TNT1 A 0 A_Takeinventory("Zoomed",1)
        TNT1 A 0 A_ZoomFactor(1.0)
		TNT1 A 0 A_Takeinventory("Taunting",1)
		TNT1 A 0 A_JumpIfInventory("RealismMode", 1, "CheckGrab")
        TNT1 A 10
		FUCK A 1
		TNT1 A 0 BRIGHT A_FireCustomMissile("Taunter", 0, 0, -1, 0)
		TNT1 A 0 BRIGHT A_FireCustomMissile("Taunter", -9, 0, -1, 0)
		TNT1 A 0 BRIGHT A_FireCustomMissile("Taunter", 9, 0, -1, 0)
        FUCK B 1 A_PlaySound("FUCK", 2)
        FUCK CD 1 A_AlertMonsters
		FUCK E 15 A_Takeinventory("Taunting",1)
        FUCK DCBA 1
        TNT1 A 10
		Goto Ready
	Salute:
	    TNT1 A 0 SetPlayerProperty(0,1,0)
		TNT1 A 0 A_ALertMonsters
		SALU ABCDEDCDEDCDEDCBA 4
		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 Ready+6
	CheckDistanceGrab:
	    TNT1 A 0 
		TNT1 A 0 A_JumpIfCloser(100, "Grab")
		Goto Ready+6
	CheckIfCanGrab:
	    TNT1 A 0 
		TNT1 A 0 A_JumpIfInTargetInventory("CanGrab", 1, "Grab")
		Goto Ready+6	
	Grab:
	    PKUP ABC 2
		TNT1 A 0 A_CustomMissile("PickupProjectile")
		PKUP DEF 2
		Goto Ready
		
	PuristGun:
		TNT1 A 1
		TNT1 A 0 A_GiveInventory("ClassicSSG", 1)
		TNT1 A 0 A_TakeInventory("SSG", 1)
		TNT1 A 10
		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")
		GRTH EEFG 1
		TNT1 A 0 A_PLaySound ("GRNTOSS")
		GRTH HI 1
		TNT1 A 0 A_TakeInventory("GrenadeAmmo", 1)
		TNT1 A 0 A_FireCustomMissile("HandGrenade", random(-2,2), 0, 0, 0, 0, 0)
	    TNT1 A 0 A_TakeInventory("FiredGrenade", 1)
		GRTH JKLM 1
		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 REady+6	
		
	
	Unload:
		SHT5 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_JumpIfInventory("SSGAmmo",1,3)
        Goto Ready
        TNT1 AAA 0
		TNT1 A 0 A_Takeinventory("Zoomed",1)
		TNT1 A 0 A_GiveInventory ("Pumping", 1)
		TNT1 A 0 A_Takeinventory("Unloading",1)
		
	RemoveBullets:
		TNT1 AAAA 0
		TNT1 A 0 A_JumpIfInventory("SSGAmmo",1,3)
		Goto FinishUnload
        TNT1 AAAAAA 0
		TNT1 A 0 A_Takeinventory("SSGAmmo",1)
		TNT1 A 0 A_Giveinventory("Shell2",1)
		Goto RemoveBullets
	
	FInishUnload:
		SHT2 B 2 Offset(20,48) //A_FireCustomMissile("SmokeSpawner",0,0,0,5)
        SHT2 B 2 Offset(10,36) //A_FireCustomMissile("SmokeSpawner",0,0,0,5)
		SHT2 BCDEF 1
		SHT2 GH 1
		TNT1 A 0 A_PlaySound("weapons/sshotc")
		SHT2 IJ 1
        SHT2 K 2
		TNT1 A 20
		TNT1 A 0 A_GiveInventory("HasUnloaded", 1)
		TNT1 A 0 A_Takeinventory("Unloading",1)
		SHT2 U 1 Offset(20,46)
		SHT2 V 1 Offset(1,33)
        
		TNT1 A 0 A_GiveInventory ("Pumping", 1)
        TNT1 A 0 A_PlaySound("weapons/sshotc")
        SHT2 WX 1
		SHT2 YZ 1
		TNT1 A 0 A_PlaySound("CLIPINSS")
		TNT1 A 0 A_GiveInventory ("Pumping", 1)
        SHO9 DE 1
		SHO9 FG 1
		Goto Ready
		Goto Ready
	
	}
}




ACTOR ClassicChaingun : DoomWeapon
{
Game Doom
SpawnID 28
Weapon.SelectionOrder 700
Weapon.AmmoType1 "Clip2"
//Weapon.AmmoType2 "Clip2"
Weapon.AmmoGive 30
Weapon.AmmoUse1 1
//Weapon.AmmoUse2 1
    +WEAPON.NOAUTOAIM
	+WEAPON.NOAUTOFIRE
	+FORCEXYBILLBOARD
	+WEAPON.NO_AUTO_SWITCH
	+WEAPON.CHEATNOTWEAPON
Inventory.PickupSound "CBOXPKUP"
Inventory.PickupMessage "You got the Minigun!"
Obituary "%o was mowed down by %k's Minigun."
AttackSound "none"
Scale 0.9
States
{
Steady:
	TNT1 A 1
	Goto Ready
	
Flash:
	TNT1 A 0
	TNT1 A 0 A_JumpIfInventory("FlashlightAction", 1, "CheckFlashlight")
	TNT1 A 1
	TNT1 A 0 A_JumpIfInventory("IsFlashlightOn", 1, "FlashOn")
	Goto Flash
	FlashOn:
	TNT1 A 0 A_FireCustomMissile("FlashlightProjectile", 0, 0, 0, 0, 0, 0)
	TNT1 A 0 A_FireCustomMissile("FlashlightSource", 0, 0, 0, 0, 0, 0)
	Goto Flash 
	CheckFlashLight:
	TNT1 A 1
	TNT1 A 0 A_TakeInventory("FlashlightAction")
	TNT1 A 0 A_JumpIfInventory("IsFlashlightOn", 1, "TurnOffFlashlight")
	TNT1 A 0 A_GiveInventory("IsFlashlightOn", 1)
	Goto Flash
	TurnOffFlashlight:
	TNT1 A 0 A_TakeInventory("IsFlashlightOn", 1)
	Goto Flash
	
Ready: 
      TNT1 A 0
      TNT1 A 10 A_TakeInventory ("Spin",1)
	  TNT1 A 0 A_GunFlash
      CHGS ABCD 1 A_JumpIfInventory("GoFatality", 1, "Steady")
      TNT1 A 0 A_PlaySound("CHGNPKUP")
      TNT1 AAAAAAAAAAA 0
	  Idle:
      TNT1 A 0 A_JumpIfInventory("Kicking",1,"DoKick")
	  		TNT1 A 0 A_JumpIfInventory("Salute1", 1, "Salute")
		TNT1 A 0 A_JumpIfInventory("Salute2", 1, "Salute")
        TNT1 A 0 A_JumpIfInventory("Taunting",1,"Taunt")
      CHAG A 1 A_WeaponReady
	  TNT1 A 0 A_TakeInventory("Minigun")
		TNT1 A 0 A_TakeInventory("Rifle")
		TNT1 A 0 A_TakeInventory("DualRifles")
		TNT1 A 0 A_TakeInventory("CyberRocket_Launcher")
		TNT1 A 0 A_TakeInventory("Shot_Gun")
		TNT1 A 0 A_TakeInventory("Auto_ShotGun")
	  TNT1 A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
      TNT1 A 0 A_JumpIfInventory("Spin",1,"Ready2")
	  TNT1 A 0 A_JumpIfInventory("Clip2",1,"Idle")
      Goto IdleNoAmmo
	  
	  IdleNoAmmo:
	  CHAE A 1 A_WeaponReady
	  TNT1 A 0 A_TakeInventory ("Spin",1)
	  TNT1 A 0 A_JumpIfInventory("Clip2",1,"Idle")
	  Loop

Ready2:
      TNT1 A 0 A_JumpIfInventory("Kicking",1,"DoKick")
      TNT1 A 0 A_JumpIfInventory("Taunting",1,"Taunt")
	  TNT1 A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
      CHAG ABCD 1 A_WeaponReady 
	  TNT1 A 0 A_AlertMonsters
      TNT1 A 0 A_PlaySound("CHAINSPI")
      Loop

	Deselect:
	TNT1 A 0 A_TakeInventory ("Spin",1)
	TNT1 A 0 A_TakeInventory("TossGrenade", 1)
	 TNT1 A 0 A_Takeinventory("RandomHeadExploder",1)
	 TNT1 A 0 SetPlayerProperty(0,0,0)
	TNT1 AAAAAAAAAAAAAAAAAA 0 A_Lower
		TNT1 A 1
		Wait

    Select:
		TNT1 A 0 A_Giveinventory("RandomHeadExploder",1)
		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_Giveinventory("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)
		MARN A 0 ACS_ExecuteAlways(728, 0, 0, 0, 0)//Check if penetration is on.
		TNT1 AAAAAAAAAAAAAA 0 A_Raise
		Goto Ready

    NoAmmo:
        CHAE A 10 A_PlaySound("weapons/empty")
        Goto IdleNoAmmo
		
	Fire:
	    TNT1 A 0
		TNT1 A 0 A_JumpIfInventory("Spin",1,"Fire2")
		TNT1 A 0 A_PlaySound("CHAINSTA", 3)
		TNT1 A 0 BRIGHT A_FireCustomMissile("Alerter", 0, 0, 0, 0)
		CHAG BC 2
		CHAG D 2
		CHAG BC 1
		CHAG D 1
		CHAG BC 1
		CHAG D 1
        TNT1 A 0
    Hold:
		TNT1 A 0 A_JumpIfInventory("Salute1", 1, "Salute")
		TNT1 A 0 A_JumpIfInventory("Salute2", 1, "Salute")
		TNT1 A 0 A_JumpIfInventory("Spin",1,"Fire2")
		
        TNT1 A 0 A_Recoil(0.1)
		TNT1 A 0 A_SetAngle(random(1, -1) + angle)
		TNT1 A 0 A_SetPitch(-0.5 + pitch)
		
		
		//TNT1 A 0 A_CustomMissile ("Rocket", 0, 0, 15, 2)
		
		
	    TNT1 A 0 A_PlaySound("CHAINSPI", 3)
         TNT1 A 0 A_PlaySound("CHGNSHOT", 1)
		 TNT1 A 0 A_SpawnItem("DistantMinigunFireSound", 0, 0, 0)
        TNT1 A 0 A_Recoil(0.1)
		TNT1 A 0 A_FireCustomMissile("ShakeYourAssMinor", 0, 0, 0, 0)
		////TNT1 A 0 A_FireCustomMissile("YellowFlareSpawn",0,0,0,0)
		RIFF A 0 A_FireCustomMissile("GunFireSmoke", 0, 0, 0, 0, 0, 0)
        CHAF A 1 BRIGHT A_FireBullets(4, 4, 1, 9, "MachineGunBulletPuff", 1)
		TNT1 A 0 A_SpawnItemEx("PlayerMuzzle2",30,5,27)
        CHAF A 0 BRIGHT A_FireCustomMissile("MinigunTracer", random(-3,3), 0, -1, -12, 0, random(-3,3))
		TNT1 A 0 A_JumpIfInventory("NoPenetration", 1, 2)
		RIFF A 0 A_FireCustomMissile("WallPenetrationHitscan", random(-3,3), 0, -1, 0, 0, random(-3,3))
		TNT1 A 0
        TNT1 A 0 A_Firecustommissile("50CaseSpawn",0,0,-12,-18)
        CHAF B 1
		
		TNT1 A 0 A_PlaySound("CHGNSHOT", 1)
		TNT1 A 0 A_SpawnItem("DistantMinigunFireSound", 0, 0, 0)
		////TNT1 A 0 A_FireCustomMissile("YellowFlareSpawn",0,0,0,0)
		
        CHAF J 1 BRIGHT A_FireBullets(4, 4, 1, 9, "MachineGunBulletPuff", 1)
		TNT1 A 0 A_SpawnItemEx("PlayerMuzzle2",30,5,27)
        CHAF A 0 BRIGHT A_FireCustomMissile("MinigunTracer", random(-3,3), 0, -1, -12, 0, random(-3,3))
		TNT1 A 0 A_JumpIfInventory("NoPenetration", 1, 2)
		RIFF A 0 A_FireCustomMissile("WallPenetrationHitscan", random(-3,3), 0, -1, 0, 0, random(-3,3))
		TNT1 A 0
        TNT1 A 0 A_Firecustommissile("50CaseSpawn",0,0,-12,-18)
	    CHAF H 1 A_SetAngle(random(1, -1) + angle)
        MNGG B 0 A_ReFire
		
     TNT1 A 0 A_JumpIfInventory("Kicking",1,"DoKick")
	 TNT1 A 0 A_JumpIfInventory("Salute1", 1, "Salute")
	 TNT1 A 0 A_JumpIfInventory("Salute2", 1, "Salute")
	 CHAG A 1 A_WeaponReady
	 TNT1 A 0 A_FireCustomMissile("SmokeSpawner11",0,0,0,0)
	 CHAG B 1 A_WeaponReady
	 TNT1 A 0 A_Refire
	 TNT1 A 0 A_FireCustomMissile("SmokeSpawner11",0,0,0,0)
	 CHAG C 1 A_WeaponReady
	 TNT1 A 0 A_FireCustomMissile("SmokeSpawner11",0,0,0,0)
	 CHAG D 1 A_WeaponReady
	 TNT1 A 0 A_FireCustomMissile("SmokeSpawner11",0,0,0,0)		

     TNT1 A 0 A_JumpIfInventory("Kicking",1,"DoKick")
	 TNT1 A 0 A_PlaySound("CHAINSTO", 3)
	 TNT1 A 0 A_JumpIfInventory("Salute1", 1, "Salute")
	 TNT1 A 0 A_JumpIfInventory("Salute2", 1, "Salute")
	 CHAG A 1 A_WeaponReady
	 TNT1 A 0 A_FireCustomMissile("SmokeSpawner11",0,0,0,0)
	 CHAG B 1 A_WeaponReady
	 TNT1 A 0 A_FireCustomMissile("SmokeSpawner11",0,0,0,0)
	 CHAG C 2 A_WeaponReady
	 TNT1 A 0 A_FireCustomMissile("SmokeSpawner11",0,0,0,0)
	 CHAG D 2 A_WeaponReady
	 TNT1 A 0 A_FireCustomMissile("SmokeSpawner11",0,0,0,0)
      
	 TNT1 A 0 A_TakeInventory("Spin", 1)
     TNT1 A 0 A_JumpIfInventory("Kicking",1,"DoKick")
	 TNT1 A 0 A_JumpIfInventory("Salute1", 1, "Salute")
	 TNT1 A 0 A_JumpIfInventory("Salute2", 1, "Salute")
	 
	 CHAG A 2
	 TNT1 A 0 A_FireCustomMissile("SmokeSpawner11",0,0,0,0)
	 CHAG B 2
	 TNT1 A 0 A_FireCustomMissile("SmokeSpawner11",0,0,0,0)
	 CHAG C 2 A_WeaponReady
	 TNT1 A 0 A_FireCustomMissile("SmokeSpawner11",0,0,0,0)
	 CHAG D 2 A_WeaponReady
	 TNT1 A 0 A_FireCustomMissile("SmokeSpawner11",0,0,0,0)
	 CHAG ABCD 2 A_WeaponReady
	 CHAG ABCD 3 A_WeaponReady
	 
     goto Ready+13


	
Fire2:
		 TNT1 A 0 A_PlaySound("CHGNSHOT")
        TNT1 A 0 A_Recoil(0.1)
		TNT1 A 0 A_FireCustomMissile("ShakeYourAssMinor", 0, 0, 0, 0)
		////TNT1 A 0 A_FireCustomMissile("YellowFlareSpawn",0,0,0,0)
		
        CHAF A 1 BRIGHT A_FireBullets(4, 4, 1, 9, "MachineGunBulletPuff", 1)
		TNT1 A 0 A_SpawnItemEx("PlayerMuzzle2",30,5,27)
		TNT1 A 0 A_SpawnItem("DistantMinigunFireSound", 0, 0, 0)
        CHAF A 0 BRIGHT A_FireCustomMissile("MinigunTracer", random(-3,3), 0, -1, -12, 0, random(-3,3))
		TNT1 A 0 A_JumpIfInventory("NoPenetration", 1, 2)
		RIFF A 0 A_FireCustomMissile("WallPenetrationHitscan", random(-3,3), 0, -1, 0, 0, random(-3,3))
		TNT1 A 0
        TNT1 A 0 A_Firecustommissile("50CaseSpawn",0,0,-12,-18)
        CHAF B 1 A_SetPitch(-0.5 + pitch)
		TNT1 A 0 A_SetAngle(random(1, -1) + angle)
		RIFF A 0 A_FireCustomMissile("GunFireSmoke", 0, 0, 0, 0, 0, 0)
		TNT1 A 0 A_PlaySound("CHGNSHOT")
		////TNT1 A 0 A_FireCustomMissile("YellowFlareSpawn",0,0,0,0)
		
        CHAF J 1 BRIGHT A_FireBullets(4, 4, 1, 9, "MachineGunBulletPuff", 1)
		TNT1 A 0 A_SpawnItemEx("PlayerMuzzle2",30,5,27)
		TNT1 A 0 A_SpawnItem("DistantMinigunFireSound", 0, 0, 0)
        CHAF A 0 BRIGHT A_FireCustomMissile("MinigunTracer", random(-3,3), 0, -1, -12, 0, random(-3,3))
		TNT1 A 0 A_JumpIfInventory("NoPenetration", 1, 2)
		RIFF A 0 A_FireCustomMissile("WallPenetrationHitscan", random(-3,3), 0, -1, 0, 0, random(-3,3))
		TNT1 A 0
        TNT1 A 0 A_Firecustommissile("50CaseSpawn",0,0,-12,-18)
		TNT1 A 0 A_SetAngle(random(1, -1) + angle)
		CHAF B 1

        MNGG B 0 A_ReFire

     CHAG A 1 A_WeaponReady
     TNT1 A 0 A_FireCustomMissile("SmokeSpawner",0,0,0,0)

     CHAG B 1 A_WeaponReady
     TNT1 A 0 A_FireCustomMissile("SmokeSpawner",0,0,0,0)

     CHAG C 1 A_WeaponReady
     TNT1 A 0 A_FireCustomMissile("SmokeSpawner",0,0,0,0)

     CHAG D 1 A_WeaponReady
     TNT1 A 0 A_FireCustomMissile("SmokeSpawner",0,0,0,0)

        goto Ready2





  AltFire:
     
     TNT1 A 0 A_JumpIfInventory("Spin",1,"StopAlt")
     TNT1 A 0 A_GiveInventory ("Spin",1)
     //TNT1 A 0 SetPlayerProperty(0,1,0)
      TNT1 A 0 A_PlaySound("CHAINSTA")
	  TNT1 A 0 A_JumpIfInventory("Clip2",1,1)
	  Goto IdleNoAmmo
     CHAG ABCD 2
     TNT1 A 0
     Goto Ready2

  StopAlt:
	TNT1 A 0
     TNT1 A 0 A_TakeInventory ("Spin",1)
     TNT1 A 0 A_PlaySound("CHAINSTO")
     //TNT1 A 0 SetPlayerProperty(0,0,0)
	 CHAG ABCD 1
     CHAG ABCDABCD 2 A_WeaponReady
	 CHAG ABCD 3 A_WeaponReady
     TNT1 A 0
     Goto Ready+13


 	
    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 (pitch > 32, "LowKickChecker1")
		Goto InitializeNormalKick
		
		LowKickChecker1:
		TNT1 A 0
	    NULL A 0 A_JumpIf (pitch > 90, "InitializeNormalKick")
		RIFF A 0 A_FireCustomMissile("KickAttackDetectDowned", 0, 0, 0, 0)
		
		InitializeNOrmalKick:
        TNT1 A 0 A_jumpifinventory("PowerStrength",1,"BerserkerKick")
		TNT1 A 0 A_PlaySound("KICK")
		TNT1 A 0 SetPlayerProperty(0,1,0)
		MGKI BCD 1
		RIFF A 0 A_FireCustomMissile("KickAttack", 0, 0, 0, -7)
        MGKI H 5
		KICK A 0 A_Takeinventory("Kicking",1)
		MGKI I 1
		MGKI GFEDCBA 1 
		TNT1 A 0 SetPlayerProperty(0,0,0)
		TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
		Goto Ready+6
    BerserkerKick:
		TNT1 A 0 A_PlaySound("KICK")
		TNT1 A 0 SetPlayerProperty(0,1,0)
		MGKI BCD 1
        RIFF A 0 A_FireCustomMissile("SuperKickAttack", 0, 0, 0, -7)
        MGKI H 5
		KICK A 0 A_Takeinventory("Kicking",1)
		MGKI I 1
		MGKI GFEDCBA 1 
		TNT1 A 0 SetPlayerProperty(0,0,0)
		TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
		Goto Ready+6
	
	AirKick:
	    TNT1 A 0 A_jumpifinventory("PowerStrength",1,"SuperAirKick")
		TNT1 A 0 A_PlaySound("KICK")
		TNT1 A 0 A_Recoil (-6)
		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 Ready+6
		
	SuperAirKick:
		TNT1 A 0 A_PlaySound("KICK")
		TNT1 A 0 A_Recoil (-6)
		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 Ready+6
	
	Taunt:
		TNT1 A 0 A_Takeinventory("Zoomed",1)
        TNT1 A 0 A_ZoomFactor(1.0)
		TNT1 A 0 A_Takeinventory("Taunting",1)
		TNT1 A 0 A_JumpIfInventory("RealismMode", 1, "CheckGrab")
        TNT1 A 10
		FUCK A 1
		TNT1 A 0 BRIGHT A_FireCustomMissile("Taunter", 0, 0, -1, 0)
		TNT1 A 0 BRIGHT A_FireCustomMissile("Taunter", -9, 0, -1, 0)
		TNT1 A 0 BRIGHT A_FireCustomMissile("Taunter", 9, 0, -1, 0)
        FUCK B 1 A_PlaySound("FUCK", 2)
        FUCK CD 1 A_AlertMonsters
		FUCK E 15 A_Takeinventory("Taunting",1)
        FUCK DCBA 1
        TNT1 A 10
		Goto Ready
	Salute:
	    TNT1 A 0 SetPlayerProperty(0,1,0)
		TNT1 A 0 A_ALertMonsters
		SALU ABCDEDCDEDCDEDCBA 4
		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 Ready+6
	CheckDistanceGrab:
	    TNT1 A 0 
		TNT1 A 0 A_JumpIfCloser(100, "Grab")
		Goto Ready+6
	CheckIfCanGrab:
	    TNT1 A 0 
		TNT1 A 0 A_JumpIfInTargetInventory("CanGrab", 1, "Grab")
		Goto Ready+6	
	Grab:
	    PKUP ABC 2
		TNT1 A 0 A_CustomMissile("PickupProjectile")
		PKUP DEF 2
		Goto Ready
		
	PuristGun:
		TNT1 A 1
		TNT1 A 0 A_GiveInventory("ClassicChaingun", 1)
		TNT1 A 0 A_TakeInventory("MiniGun", 1)
		TNT1 A 10
		Goto Ready2	
	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")
		GRTH EEFG 1
		TNT1 A 0 A_PLaySound ("GRNTOSS")
		GRTH HI 1
		TNT1 A 0 A_TakeInventory("GrenadeAmmo", 1)
		TNT1 A 0 A_FireCustomMissile("HandGrenade", random(-2,2), 0, 0, 0, 0, 0)
	    TNT1 A 0 A_TakeInventory("FiredGrenade", 1)
		GRTH JKLM 1
		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 REady+12	
	}
}

ACTOR ClassicRocketLauncher : DoomWeapon
{
	Game Doom
	SpawnID 29
	Speed 20
	Damage 20
	Weapon.SelectionOrder 9500
	Weapon.AmmoUse1 0
	Weapon.AmmoUse2 0
	Weapon.AmmoGive2 0
	Weapon.AmmoGive1 6
	Weapon.AmmoType1 "RocketAmmo"
	Weapon.AmmoType2 "RocketRounds"
    Inventory.PickupSound "ROCKPKUP"
    +WEAPON.NOAUTOAIM
	+FORCEXYBILLBOARD
	+WEAPON.CHEATNOTWEAPON
	+WEAPON.AXEBLOOD
	+WEAPON.NO_AUTO_SWITCH
	Inventory.PickupMessage "$GOTLAUNCHER"
	States
	{
	
	Steady:
	TNT1 A 1
	Goto Ready
	Ready:
	    TNT1 A 0
        TNT1 A 8 A_PlaySound("RLANDRAW")
        RKTS ABCDEFG 1 A_JumpIfInventory("GoFatality", 1, "Steady")
        TNT1 AAAAA 0
        //TNT1 A 0 A_JumpIfInventory("RocketRounds",1,2)
        //Goto Reload
        TNT1 AAAA 0
        TNT1 A 0 A_JumpIfInventory("Reloading",1,"Reload")
        TNT1 A 0 A_JumpIfInventory("Kicking",1,"DoKick")
		TNT1 A 0 A_JumpIfInventory("Salute1", 1, "Salute")
		TNT1 A 0 A_JumpIfInventory("Salute2", 1, "Salute")
        TNT1 A 0 A_JumpIfInventory("Taunting",1,"Taunt")
		TNT1 A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
		RKTG A 1 A_WeaponReady
		TNT1 A 0 A_TakeInventory("Rocket_Launcher", 1)
		TNT1 A 0 A_TakeInventory("Rifle")
		TNT1 A 0 A_TakeInventory("DualRifles")
        Goto Ready+11
	Deselect:
        RKTS GFEDCBA 1
		TNT1 A 0 A_TakeInventory("TossGrenade", 1)
		TNT1 AAAAAAAAAAAAAAAAAA 0 A_Lower
		TNT1 A 1
		Wait
	Select:
	
	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_Giveinventory("RocketLauncherSelected",1)
	TNT1 A 0 A_Giveinventory("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)
	
		RKTG A 0 A_Raise
		Wait
	Fire:
        TNT1 A 0 A_JumpIfInventory("RocketRounds",1,2)
        Goto Reload
        TNT1 AAAA 0

		TNT1 A 0 A_FireCustomMissile("RedFlareSpawn",-5,0,0,0)
        TNT1 A 0 A_PlaySound ("DSRFIRE")
		TNT1 A 0 BRIGHT A_FireCustomMissile("Alerter")
		RKTF A 1 BRIGHT A_FireCustomMissile("Rocket", 0, 1, 0, -10)
		TNT1 A 0 A_Takeinventory("RocketRounds",1)
        //TNT1 A 0 ACS_Execute(374, 0, 0, 0, 0)
		RKTF BCD 1 BRIGHT
        RKTF E 1 A_SetPitch(-6.0 + pitch)
        RKTG BCD 2 A_SetPitch(2.0 + pitch)
		RKTG EF 2
        RKTG A 0
        TNT1 A 0 A_Refire
        Goto Ready+11


    Reload:
		RKTG A 1 A_WeaponReady
		RKTG A 6
		TNT1 A 0 A_Takeinventory("Reloading",1)
        TNT1 A 0 A_JumpIfInventory("RocketRounds",6,"NoNeedToReload")
        TNT1 A 0 A_JumpIfInventory("RocketAmmo",1,3)
        Goto Ready+18
        TNT1 AAAA 0
        TNT1 A 0 A_PlaySound("Reload")
		TNT1 A 0 A_SetAngle(-2 + angle)
        TNT1 A 0 A_SetPitch(+2 + pitch)
        RKTR ABCDDE 1 
        TNT1 A 0 A_FireCustomMissile("RocketCaseSpawn",-30,0,-4,-4)
        RKTR EFFGG 1
		TNT1 A 0 A_SetAngle(+2 + angle)
        TNT1 A 0 A_SetPitch(-2 + pitch)
		RKTR HHIIJJKLM 1
		TNT1 A 0 A_SetAngle(+1 + angle)
        RKTR MMMNOP 1
		TNT1 A 0 A_SetAngle(-1 + angle)
		RKTR Q 3
		RKTR PR 1
		RKTG DEF 2
		RKTG A 6
		Goto FinishReload
		
		FinishReload:
		TNT1 AAAAAA 0
		TNT1 A 0 A_JumpIfInventory("RocketRounds",6,"NoNeedToReload")
		TNT1 A 0 A_JumpIfInventory("RocketAmmo",1,3)
		Goto Ready+6
        TNT1 AAAAAA 0
		TNT1 A 0 A_Giveinventory("RocketRounds",1)
		TNT1 A 0 A_Takeinventory("RocketAmmo",1)
		Goto FinishReload
		
		TNT1 AAAAAAAAAA 0
		
		NoNeedToReload:
        RKTG A 1 A_Refire
        Goto Ready+11


	Spawn:
		LAUN A -1
		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 (pitch > 32, "LowKickChecker1")
		Goto InitializeNormalKick
		
		LowKickChecker1:
		TNT1 A 0
	    NULL A 0 A_JumpIf (pitch > 90, "InitializeNormalKick")
		RIFF A 0 A_FireCustomMissile("KickAttackDetectDowned", 0, 0, 0, 0)
		
		InitializeNOrmalKick:
        TNT1 A 0 A_jumpifinventory("PowerStrength",1,"BerserkerKick")
		TNT1 A 0 A_PlaySound("KICK")
		TNT1 A 0 SetPlayerProperty(0,1,0)
		RLKI BCD 1
		RIFF A 0 A_FireCustomMissile("KickAttack", 0, 0, 0, -7)
        RLKI H 5
		KICK A 0 A_Takeinventory("Kicking",1)
		RLKI I 1
		RLKI GFEDCBA 1 
		TNT1 A 0 SetPlayerProperty(0,0,0)
		TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
		Goto Ready+11
    BerserkerKick:
		TNT1 A 0 A_PlaySound("KICK")
		TNT1 A 0 SetPlayerProperty(0,1,0)
		RLKI BCD 1
        RIFF A 0 A_FireCustomMissile("SuperKickAttack", 0, 0, 0, -7)
        RLKI H 5
		KICK A 0 A_Takeinventory("Kicking",1)
		RLKI I 1
		RLKI GFEDCBA 1 
		TNT1 A 0 SetPlayerProperty(0,0,0)
		TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
		Goto Ready+11
	
	AirKick:
	    TNT1 A 0 A_jumpifinventory("PowerStrength",1,"SuperAirKick")
		TNT1 A 0 A_PlaySound("KICK")
		TNT1 A 0 A_Recoil (-6)
		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 Ready+11
		
	SuperAirKick:
		TNT1 A 0 A_PlaySound("KICK")
		TNT1 A 0 A_Recoil (-6)
		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 Ready+11
	
	Taunt:
		TNT1 A 0 A_Takeinventory("Zoomed",1)
        TNT1 A 0 A_ZoomFactor(1.0)
		TNT1 A 0 A_Takeinventory("Taunting",1)
		TNT1 A 0 A_JumpIfInventory("RealismMode", 1, "CheckGrab")
        TNT1 A 10
		FUCK A 1
		TNT1 A 0 BRIGHT A_FireCustomMissile("Taunter", 0, 0, -1, 0)
		TNT1 A 0 BRIGHT A_FireCustomMissile("Taunter", -9, 0, -1, 0)
		TNT1 A 0 BRIGHT A_FireCustomMissile("Taunter", 9, 0, -1, 0)
        FUCK B 1 A_PlaySound("FUCK", 2)
        FUCK CD 1 A_AlertMonsters
		FUCK E 15 A_Takeinventory("Taunting",1)
        FUCK DCBA 1
        TNT1 A 10
		Goto Ready
	Salute:
	    TNT1 A 0 SetPlayerProperty(0,1,0)
		TNT1 A 0 A_ALertMonsters
		SALU ABCDEDCDEDCDEDCBA 4
		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 Ready+6
	CheckDistanceGrab:
	    TNT1 A 0 
		TNT1 A 0 A_JumpIfCloser(100, "Grab")
		Goto Ready+6
	CheckIfCanGrab:
	    TNT1 A 0 
		TNT1 A 0 A_JumpIfInTargetInventory("CanGrab", 1, "Grab")
		Goto Ready+6	
	Grab:
	    PKUP ABC 2
		TNT1 A 0 A_CustomMissile("PickupProjectile")
		PKUP DEF 2
		Goto Ready
		
	PuristGun:
		TNT1 A 1
		TNT1 A 0 A_GiveInventory("ClassicRocketLauncher", 1)
		TNT1 A 0 A_TakeInventory("Rocket_Launcher", 1)
		TNT1 A 10
		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")
		GRTH EEFG 1
		TNT1 A 0 A_PLaySound ("GRNTOSS")
		GRTH HI 1
		TNT1 A 0 A_TakeInventory("GrenadeAmmo", 1)
		TNT1 A 0 A_FireCustomMissile("HandGrenade", random(-2,2), 0, 0, 0, 0, 0)
	    TNT1 A 0 A_TakeInventory("FiredGrenade", 1)
		GRTH JKLM 1
		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 REady+11	
	}
}

ACTOR ClassicPlasmaRifle : DoomWeapon
{
	Game Doom
	Weapon.SelectionOrder 1
	Weapon.AmmoUse 1
	Weapon.AmmoGive 40
	Weapon.AmmoType "Cell"
	+WEAPON.CHEATNOTWEAPON
	+WEAPON.NOAUTOAIM
	Inventory.PickupMessage "$GOTPLASMA"
	Tag "$TAG_PLASMARIFLE"
	States
	{
	Ready:
	    TNT1 A 0 A_TakeInventory("Plasma_Gun", 1)
		3LSG A 1 A_WeaponReady
		TNT1 A 0 A_TakeInventory("Plasma_Gun", 1)
		TNT1 A 0 A_TakeInventory("Rifle")
		TNT1 A 0 A_TakeInventory("DualRifles")
		Loop
	Deselect:
	    TNT1 A 0 A_Takeinventory("HasPlasmaWeapon",1)
		TNT1 A 0 A_TakeInventory("Plasma_Gun", 1)
		TNT1 A 0 A_TakeInventory("Rifle")
		TNT1 A 0 A_TakeInventory("DualRifles")
		3LSG A 1 A_Lower
		Loop
	Select:
	    TNT1 A 0 A_Giveinventory("HasPlasmaWeapon",1)
		3LSG A 1 A_Raise
		Loop
	Fire:
		TNT1 A 0 A_FireCustomMissile("ClassicPlasmaBall", 0, 1, 0, -10)
		3LSF EF 1 BRIGHT
		3KPL A 1
		TNT1 A 0 A_Refire
		3KPL ABCDEFF 1
		3KPL G 6
		3KPL FFEDCBA 1
		Goto Ready
	Spawn:
		PLAS A -1
		Stop
	}
}

ACTOR ClassicPlasmaBall
{
	Game Doom
	Radius 4
	Height 4
	Speed 25
	Damage 7
	Projectile
	+RANDOMIZE
	RenderStyle Add
	Alpha 0.75
	SeeSound "weapons/plasmaf"
	DeathSound "weapons/plasmax"
	damagetype Plasma
	Obituary "$OB_MPPLASMARIFLE"
	Species "Marines"
	+THRUSPECIES
	+MTHRUSPECIES
	States
	{
	DM:
		TNT1 A 0
		TNT1 A 0 A_ChangeFLag("THRUSPECIES", 0)
		TNT1 A 0 A_ChangeFLag("MTHRUSPECIES", 0)
		Goto Spawn1
	
	Spawn:
		TNT1 A 0
		TNT1 A 0 ACS_ExecuteAlways(719, 0, 0, 0, 0)//Check if Coop

	Spawn1:
	    TNT1 A 1
		Goto Spawn2
	Spawn2:
		PLSS ABAB 1 Bright A_SpawnItem("BlueFlareSmall")
		Loop
	Death:
	    TNT1 A 0
		TNT1 A 0 A_CustomMissile ("BluePlasmaFire", 0, 0, random (0, 360), 2, random (0, 360))
		TNT1 AAAAA 0 A_CustomMissile ("BluePlasmaParticle", 0, 0, random (0, 360), 2, random (0, 360))
		PLSE ABC 2 BRIGHT A_SpawnItem("BlueFlare")
		PLSE DE 2 Bright A_SpawnItem("BlueFlareSmall")
		Stop
	}
}


ACTOR VanillaBFG9000 : DoomWeapon
{
	Game Doom
	Height 20
	Weapon.SelectionOrder 2
	Weapon.AmmoUse 40
	Weapon.AmmoGive 40
	Weapon.AmmoType "Cell"
	+WEAPON.NOAUTOFIRE
	+WEAPON.CHEATNOTWEAPON
	Inventory.PickupMessage "$GOTBFG9000"
	Tag "$TAG_BFG9000"
	States
	{
	Ready:
		TNT1 A 0 A_TakeInventory("BIG_FUCKING_GUN", 1)
		BFGG A 1 A_WeaponReady
		TNT1 A 0 A_TakeInventory("BIG_FUCKING_GUN", 1)
		TNT1 A 0 A_TakeInventory("Rifle")
		TNT1 A 0 A_TakeInventory("DualRifles")
		Loop
	Deselect:
		BFGG A 1 A_Lower
		Loop
	Select:
		BFGG A 1 A_Raise
		Loop
	Fire:
        TNT1 A 0 A_PlaySound("BFGCHARGE")
		BFGC ABABABABABABABAB 2 BRIGHT A_FireCustomMissile("GreenFlareSpawn",0,0,0,0)
        BFGF A 2 BRIGHT A_FireCustomMissile("GreenFlareSpawn",0,0,0,0)
        TNT1 A 0 A_PlaySound("BFGFIRE")
		TNT1 AAA 0 A_FireCustomMissile("GreenFlareSpawn",0,0,0,0)
        TNT1 A 0 A_Recoil(8)
        //TNT1 A 0 A_ZoomFactor(1.3)
        TNT1 A 0 BRIGHT A_FireCustomMissile("Alerter", 0, 0, -1, 0)
		TNT1 A 0 A_FireBFG
		BFGF B 2 BRIGHT// A_FireCustomMissile("SuperBFGBall", 0, 1, 0, 0)
		TNT1 A 0 A_FireCustomMissile("ShakeYourAssDouble", 0, 0, 0, 0)
        BFGF CDEF 2 BRIGHT A_FireCustomMissile("GreenFlareSpawn",0,0,0,0)
        //TNT1 A 0 A_ZoomFactor(1.0)
        BFGG A 1 BRIGHT
		BFGG A 4
        TNT1 A 0  A_Refire
		Goto Ready
	}
}