Actor Chain_saw : BrutalWeapon
{
	weapon.selectionorder 2200
	Weapon.AmmoType1 "Gas"
	Weapon.AmmoGive 50
	Weapon.AmmoUse1 1
	Weapon.UpSound "none"
	weapon.readysound "weapons/chainsaw/idle"
    +WEAPON.NOAUTOAIM
	+WEAPON.AXEBLOOD
	+WEAPON.MELEEWEAPON
	+WEAPON.ALT_USES_BOTH
	+FORCEXYBILLBOARD
	+WEAPON.NO_AUTO_SWITCH
	Weapon.KickBack 0
	inventory.pickupsound "weapons/chainsaw/draw"
	Inventory.PickupMessage "$GOTCHAINSAW"
	Tag "Chainsaw"
	Scale 0.8
	DropItem "ChainsawSpawner"
	states
	{
	Spawn:
		CSAW A -1
		Stop

	Select:
		SAWG A 0
		SAWG A 0 A_Giveinventory("GoSpecial",1)
		TNT1 A 0 A_TakeInventory("FistsSelected", 1)
		TNT1 A 0 A_TakeInventory("ShotgunSelected", 1)
		TNT1 A 0 A_TakeInventory("MinigunSelected", 1)
		TNT1 A 0 A_TakeInventory("SSGSelected", 1)
		TNT1 A 0 A_TakeInventory("RocketLauncherSelected", 1)
		TNT1 A 0 A_TakeInventory("GrenadeLauncherSelected", 1)
		TNT1 A 0 A_TakeInventory("PlasmaGunSelected", 1)
		TNT1 A 0 A_TakeInventory("RailGunSelected", 1)
		TNT1 A 0 A_TakeInventory("RevenantLauncherSelected", 1)
		TNT1 A 0 A_TakeInventory("SubMachineGunSelected", 1)
		TNT1 A 0 A_TakeInventory("BFG10KSelected", 1)
		TNT1 A 0 A_TakeInventory("BFGSelected", 1)
		TNT1 A 0 A_TakeInventory("FlameCannonSelected", 1)
		TNT1 A 0 A_GiveInventory("SawSelected", 1)
		AXEG A 0 A_TakeInventory("HasPlasmaWeapon",1)
		AXEG A 0 A_Giveinventory("HasCutingWeapon",1)
		SAWG A 0 A_Takeinventory("HasBarrel",1)
		KICK A 0 A_Takeinventory("PowerBloodOnVisor",1)
		KICK A 0 A_Takeinventory("PowerBlueBloodOnVisor",1)
		KICK A 0 A_Takeinventory("PowerGreenBloodOnVisor",1)
		TNT1 A 0 A_SetCrosshair(41)
		SAWG A 0 A_GunFlash
		TNT1 AAAAAA 1 A_RAise
		TNT1 AAAAAAAAA 0 A_Raise
		Goto SelectAnimation

	SelectAnimation:
		SAWY ABCDE 1 A_JumpIfInventory("GoFatality", 1, "Steady")
		SAWG A 0 A_PlaySound("DSSAWZIP", 1)
        SAWS ABCDEFEDCB 1
		SAWS A 3 A_playsound("weapons/chainsaw/draw", 3)
		SAWS GH 1
		Goto REady

	Deselect:
	    SAWY EDCBA 1
		SAWG A 0 A_StopSound(6)
		AXEG A 0 A_Takeinventory("PowerBloodOnVisor",1)
		AXEG A 0 A_Takeinventory("PowerBlueBloodOnVisor",1)
		AXEG A 0 A_Takeinventory("PowerGreenBloodOnVisor",1)
		SAWG A 0 A_Takeinventory("HasCutingWeapon",1)
		TNT1 A 0 A_TakeInventory("Unloading", 1)
		TNT1 A 0 A_TakeInventory("Reloading", 1)
		TNT1 A 0 A_TakeInventory("StartDualWield",1)
		SAWG A 0 A_StopsoundEx("Weapon")
		TNT1 A 0 A_SetCrosshair(0)
		TNT1 AAAAAAAAAAAAAAAAAA 0 A_Lower
		TNT1 A 1 A_Lower
		wait

	Ready:
	Ready3:
		TNT1 A 0 A_SetCrosshair(41)
	Reload:
	ReadyToFire:
		SAWG A 0
		SAWG A 0 A_StopSound(4)
		SAWG A 0 A_StopSound(1)
		SAWG A 0 A_JumpIfInventory("Kicking",1,"DoKick")
        SAWG A 0 A_JumpIfInventory("Taunting",1,"Taunt")
		SAWG A 0 A_JumpIfInventory("Salute1", 1, "Salute")
		SAWG A 0 A_JumpIfInventory("Salute2", 1, "Salute")
		SAWG A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
		TNT1 A 0 A_JumpIfInventory("ExecuteDownedEnemy", 1, "DoExecution")
		SAWG A 0 A_FireCustomMissile("SmokeSpawner",0,0,0,5)
        SAWG A 0 A_JumpIfInventory("PowerBloodOnVisor",1,"Ready.Blood")
        SAWG A 0 A_JumpIfInventory("PowerBlueBloodOnVisor",1,"Ready.BlueBlood")
        SAWG A 0 A_JumpIfInventory("PowerGreenBloodOnVisor",1,"Ready.GreenBlood")
		SAWG A 0 A_playsoundex("weapons/chainsaw/idle", 6)
		SAWG ABAB 2 A_weaponready
		SAWG A 0 A_JumpIfInventory("IsRunning",1,"StartSprint")
		Loop

	Ready.Blood:
		SAWG A 0
		SAWG A 0 A_TakeInventory("PowerBlueBloodOnVisor", 1)
		SAWG A 0 A_TakeInventory("PowerGreenBloodOnVisor", 1)
		SAWG A 0 A_StopSound(4)
		SAWG A 0 A_StopSound(1)
		SAWG A 0 A_playsoundex("weapons/chainsaw/idle", 6)
		SAW2 ABAB 2 A_weaponready
		SAWG A 0 A_FireCustomMissile("SmokeSpawner",0,0,0,5)
		SAWG A 0 A_JumpIfInventory("Kicking",1,"DoKick")
        SAWG A 0 A_JumpIfInventory("Taunting",1,"Taunt")
		SAWG A 0 A_JumpIfInventory("Salute1", 1, "Salute")
		SAWG A 0 A_JumpIfInventory("Salute2", 1, "Salute")
		SAWG A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
		TNT1 A 0 A_JumpIfInventory("ExecuteDownedEnemy", 1, "DoExecution")
		SAWG A 0 A_JumpIfInventory("IsRunning",1,"StartSprint.Blood")
		SAWG A 0 A_playsoundex("weapons/chainsaw/idle", 6)
		SSW2 CDEF 2 A_weaponready
		SAWG A 0 A_FireCustomMissile("SmokeSpawner",0,0,0,5)
		SAWG A 0 A_JumpIfInventory("Kicking",1,"DoKick")
        SAWG A 0 A_JumpIfInventory("Taunting",1,"Taunt")
		SAWG A 0 A_JumpIfInventory("Salute1", 1, "Salute")
		SAWG A 0 A_JumpIfInventory("Salute2", 1, "Salute")
		SAWG A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
		TNT1 A 0 A_JumpIfInventory("ExecuteDownedEnemy", 1, "DoExecution")
		SAWG A 0 A_JumpIfInventory("IsRunning",1,"StartSprint.Blood")
		SAWG A 0 A_playsoundex("weapons/chainsaw/idle", 6)
		SSW2 GHIJ 2 A_weaponready
		SAWG A 0 A_JumpIfInventory("IsRunning",1,"StartSprint.Blood")
		Goto ReadyToFire

	Ready.BlueBlood:
		SAWG A 0
		SAWG A 0 A_TakeInventory("PowerBloodOnVisor", 1)
		SAWG A 0 A_TakeInventory("PowerGreenBloodOnVisor", 1)
		SAWG A 0 A_StopSound(4)
		SAWG A 0 A_StopSound(1)
		SAWG A 0 A_playsoundex("weapons/chainsaw/idle", 6)
		SAW4 ABAB 2 A_weaponready
		SAWG A 0 A_FireCustomMissile("SmokeSpawner",0,0,0,5)
		SAWG A 0 A_JumpIfInventory("Kicking",1,"DoKick")
        SAWG A 0 A_JumpIfInventory("Taunting",1,"Taunt")
		SAWG A 0 A_JumpIfInventory("Salute1", 1, "Salute")
		SAWG A 0 A_JumpIfInventory("Salute2", 1, "Salute")
		SAWG A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
		TNT1 A 0 A_JumpIfInventory("ExecuteDownedEnemy", 1, "DoExecution")
		SAWG A 0 A_JumpIfInventory("IsRunning",1,"StartSprint.BlueBlood")
		SAWG A 0 A_playsoundex("weapons/chainsaw/idle", 6)
		SSW4 CDEF 2 A_weaponready
		SAWG A 0 A_FireCustomMissile("SmokeSpawner",0,0,0,5)
		SAWG A 0 A_JumpIfInventory("Kicking",1,"DoKick")
        SAWG A 0 A_JumpIfInventory("Taunting",1,"Taunt")
		SAWG A 0 A_JumpIfInventory("Salute1", 1, "Salute")
		SAWG A 0 A_JumpIfInventory("Salute2", 1, "Salute")
		SAWG A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
		TNT1 A 0 A_JumpIfInventory("ExecuteDownedEnemy", 1, "DoExecution")
		SAWG A 0 A_JumpIfInventory("IsRunning",1,"StartSprint.BlueBlood")
		SAWG A 0 A_playsoundex("weapons/chainsaw/idle", 6)
		SSW4 GHIJ 2 A_weaponready
		SAWG A 0 A_JumpIfInventory("IsRunning",1,"StartSprint.BlueBlood")
		Goto ReadyToFire

	Ready.GreenBlood:
		SAWG A 0
		SAWG A 0 A_TakeInventory("PowerBlueBloodOnVisor", 1)
		SAWG A 0 A_TakeInventory("PowerBloodOnVisor", 1)
		SAWG A 0 A_StopSound(4)
		SAWG A 0 A_StopSound(1)
		SAWG A 0 A_playsoundex("weapons/chainsaw/idle", 6)
		SAW3 ABAB 2 A_weaponready
		SAWG A 0 A_FireCustomMissile("SmokeSpawner",0,0,0,5)
		SAWG A 0 A_JumpIfInventory("Kicking",1,"DoKick")
        SAWG A 0 A_JumpIfInventory("Taunting",1,"Taunt")
		SAWG A 0 A_JumpIfInventory("Salute1", 1, "Salute")
		SAWG A 0 A_JumpIfInventory("Salute2", 1, "Salute")
		SAWG A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
		TNT1 A 0 A_JumpIfInventory("ExecuteDownedEnemy", 1, "DoExecution")
		SAWG A 0 A_JumpIfInventory("IsRunning",1,"StartSprint.GreenBlood")
		SAWG A 0 A_playsoundex("weapons/chainsaw/idle", 6)
		SSW3 CDEF 2 A_weaponready
		SAWG A 0 A_FireCustomMissile("SmokeSpawner",0,0,0,5)
		SAWG A 0 A_JumpIfInventory("Kicking",1,"DoKick")
        SAWG A 0 A_JumpIfInventory("Taunting",1,"Taunt")
		SAWG A 0 A_JumpIfInventory("Salute1", 1, "Salute")
		SAWG A 0 A_JumpIfInventory("Salute2", 1, "Salute")
		SAWG A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
		TNT1 A 0 A_JumpIfInventory("ExecuteDownedEnemy", 1, "DoExecution")
		SAWG A 0 A_JumpIfInventory("IsRunning",1,"StartSprint.GreenBlood")
		SAWG A 0 A_playsoundex("weapons/chainsaw/idle", 6)
		SSW3 GHIJ 2 A_weaponready
		SAWG A 0 A_JumpIfInventory("IsRunning",1,"StartSprint.GreenBlood")
		Goto ReadyToFire

	Fire:
		SAWG A 0
		SAWG A 0
		SAWG A 0 A_StopSound(6)
		SAWG A 0 A_TakeInventory("ChainsawHitRed", 1)
		SAWG A 0 A_TakeInventory("ChainsawHitBlue", 1)
		SAWG A 0 A_TakeInventory("ChainsawHitGreen", 1)
		SAWG A 0 A_CheckReload
		SAWG A 0 A_JumpIfInventory("PowerBloodOnVisor",1,"FireRed")
		SAWG A 0 A_JumpIfInventory("PowerGreenBloodOnVisor",1,"FireGreen")
		SAWG A 0 A_JumpIfInventory("PowerBlueBloodOnVisor",1,"FireBlue")
		SAWG A 0 A_PlaySoundEx("weapons/chainsaw/loop","Weapon",0)
		CSA1 ABCD 1
		SAWG A 0 A_PlaySound("weapons/chainsaw/draw", 4)
		CSA1 EFG 1
		CSA1 H 2 A_Saw("", "", 10, "SSawPuff", SF_NORANDOM | SF_NOUSEAMMOMISS, 48, 3, 0)
		CSA1 H 0 A_FireCustomMissile("SawDamageHorizontal", 2, 0, 0, 0)
		TNT1 A 0 A_GiveInventory("UsedStamina", 8)
		SAWG A 0 A_JumpIfInventory("ChainsawHitRed", 1, "FireContinueRed")
		SAWG A 0 A_JumpIfInventory("ChainsawHitBlue", 1, "FireContinueBlue")
		SAWG A 0 A_JumpIfInventory("ChainsawHitGreen", 1, "FireContinueGreen")
		CSA1 J 2 A_Saw("", "", 10, "SSawPuff", SF_NORANDOM | SF_NOUSEAMMOMISS, 48, 3, 0)
		CSA1 J 0 A_FireCustomMissile("SawDamageHorizontal", 1, 0, 0, 0)
		SAWG A 0 A_JumpIfInventory("ChainsawHitRed", 1, "FireContinueRed")
		SAWG A 0 A_JumpIfInventory("ChainsawHitBlue", 1, "FireContinueBlue")
		SAWG A 0 A_JumpIfInventory("ChainsawHitGreen", 1, "FireContinueGreen")
		CSA1 K 2 A_Saw("", "", 10, "SSawPuff", SF_NORANDOM | SF_NOUSEAMMOMISS, 48, 3, 0)
		CSA1 K 0 A_FireCustomMissile("SawDamageHorizontal", -1, 0, 0, 0)
		SAWG A 0 A_JumpIfInventory("ChainsawHitRed", 1, "FireContinueRed")
		SAWG A 0 A_JumpIfInventory("ChainsawHitBlue", 1, "FireContinueBlue")
		SAWG A 0 A_JumpIfInventory("ChainsawHitGreen", 1, "FireContinueGreen")
		CSA1 L 2 A_Saw("", "", 10, "SSawPuff", SF_NORANDOM | SF_NOUSEAMMOMISS, 48, 3, 0)
		CSA1 L 0 A_FireCustomMissile("SawDamageHorizontal", -2, 0, 0, 0)
		SAWG A 0 A_JumpIfInventory("ChainsawHitRed", 1, "FireContinueRed")
		SAWG A 0 A_JumpIfInventory("ChainsawHitBlue", 1, "FireContinueBlue")
		SAWG A 0 A_JumpIfInventory("ChainsawHitGreen", 1, "FireContinueGreen")
		TNT1 A 5
		CSA1 MNO 1
		SAWG A 0 A_ReFire
		goto readytofire

	AltFire:
		SAWG A 0
		SAWG A 0 A_TakeInventory("ChainsawHitRed", 1)
		SAWG A 0 A_TakeInventory("ChainsawHitBlue", 1)
		SAWG A 0 A_TakeInventory("ChainsawHitGreen", 1)
		SAWG A 0 A_CheckReload
		SAWG A 0 A_JumpIfInventory("PowerBloodOnVisor",1,"AltFire2Red")
		SAWG A 0 A_JumpIfInventory("PowerGreenBloodOnVisor",1,"AltFire2Green")
		SAWG A 0 A_JumpIfInventory("PowerBlueBloodOnVisor",1,"AltFire2Blue")
		SAWG A 0 A_PlaySoundEx("weapons/chainsaw/loop","Weapon",0)
		CSA2 ABCDDEEEF 1
		SAWG A 0 A_PlaySound("weapons/chainsaw/draw", 4)
		CSA2 GHI 1
		CSA2 J 2 A_Saw("", "", 10, "SSawPuff2", SF_NORANDOM | SF_NOUSEAMMOMISS, 48, 0, 3)
		CSA2 J 0 A_FireCustomMissile("SawDamageVertical", 0, 0, 0, 0, 0, 2)
		TNT1 A 0 A_GiveInventory("UsedStamina", 13)
		SAWG A 0 A_JumpIfInventory("ChainsawHitRed", 1, "AltContinue2Red")
		SAWG A 0 A_JumpIfInventory("ChainsawHitBlue", 1, "AltContinue2Blue")
		SAWG A 0 A_JumpIfInventory("ChainsawHitGreen", 1, "AltContinue2Green")
		CSA2 M 2 A_Saw("", "", 10, "SSawPuff2", SF_NORANDOM | SF_NOUSEAMMOMISS, 48, 0, 3)
		CSA2 M 0 A_FireCustomMissile("SawDamageVertical", 0, 0, 0, 0, 0, 1)
		SAWG A 0 A_JumpIfInventory("ChainsawHitRed", 1, "AltContinue2Red")
		SAWG A 0 A_JumpIfInventory("ChainsawHitBlue", 1, "AltContinue2Blue")
		SAWG A 0 A_JumpIfInventory("ChainsawHitGreen", 1, "AltContinue2Green")
		CSA2 N 2 A_Saw("", "", 10, "SSawPuff2", SF_NORANDOM | SF_NOUSEAMMOMISS, 48, 0, 3)
		CSA2 N 0 A_FireCustomMissile("SawDamageVertical", 0, 0, 0, 0, 0, -1)
		SAWG A 0 A_JumpIfInventory("ChainsawHitRed", 1, "AltContinue2Red")
		SAWG A 0 A_JumpIfInventory("ChainsawHitBlue", 1, "AltContinue2Blue")
		SAWG A 0 A_JumpIfInventory("ChainsawHitGreen", 1, "AltContinue2Green")
		CSA2 O 2 A_Saw("", "", 10, "SSawPuff2", SF_NORANDOM | SF_NOUSEAMMOMISS, 48, 0, 3)
		CSA2 O 0 A_FireCustomMissile("SawDamageVertical", 0, 0, 0, 0, 0, -2)
		SAWG A 0 A_JumpIfInventory("ChainsawHitRed", 1, "AltContinue2Red")
		SAWG A 0 A_JumpIfInventory("ChainsawHitBlue", 1, "AltContinue2Blue")
		SAWG A 0 A_JumpIfInventory("ChainsawHitGreen", 1, "AltContinue2Green")
		TNT1 A 5
		CSA2 PQ 1
		SAWG A 0 A_ReFire
		goto readytofire

	FireRed:
		SAWG A 0
		SAWG A 0 A_PlaySoundEx("weapons/chainsaw/loop","Weapon",0)

		CSR1 ABCD 1
		SAWG A 0 A_PlaySound("weapons/chainsaw/draw", 4)
		CSR1 EFG 1
		CSR1 H 2 A_Saw("", "", 10, "SSawPuff", SF_NORANDOM | SF_NOUSEAMMOMISS, 48, 3, 0)
		CSR1 H 0 A_FireCustomMissile("SawDamageHorizontal", 2, 0, 0, 0)
		TNT1 A 0 A_GiveInventory("UsedStamina", 8)
		SAWG A 0 A_JumpIfInventory("ChainsawHitRed", 1, "FireContinueRed")
		SAWG A 0 A_JumpIfInventory("ChainsawHitBlue", 1, "FireContinueBlue")
		SAWG A 0 A_JumpIfInventory("ChainsawHitGreen", 1, "FireContinueGreen")
		CSR1 J 2 A_Saw("", "", 10, "SSawPuff", SF_NORANDOM | SF_NOUSEAMMOMISS, 48, 3, 0)
		CSR1 J 0 A_FireCustomMissile("SawDamageHorizontal", 1, 0, 0, 0)
		SAWG A 0 A_JumpIfInventory("ChainsawHitRed", 1, "FireContinueRed")
		SAWG A 0 A_JumpIfInventory("ChainsawHitBlue", 1, "FireContinueBlue")
		SAWG A 0 A_JumpIfInventory("ChainsawHitGreen", 1, "FireContinueGreen")
		CSR1 K 2 A_Saw("", "", 10, "SSawPuff", SF_NORANDOM | SF_NOUSEAMMOMISS, 48, 3, 0)
		CSR1 K 0 A_FireCustomMissile("SawDamageHorizontal", -1, 0, 0, 0)
		SAWG A 0 A_JumpIfInventory("ChainsawHitRed", 1, "FireContinueRed")
		SAWG A 0 A_JumpIfInventory("ChainsawHitBlue", 1, "FireContinueBlue")
		SAWG A 0 A_JumpIfInventory("ChainsawHitGreen", 1, "FireContinueGreen")
		CSR1 L 2 A_Saw("", "", 10, "SSawPuff", SF_NORANDOM | SF_NOUSEAMMOMISS, 48, 3, 0)
		CSR1 L 0 A_FireCustomMissile("SawDamageHorizontal", -2, 0, 0, 0)
		SAWG A 0 A_JumpIfInventory("ChainsawHitRed", 1, "FireContinueRed")
		SAWG A 0 A_JumpIfInventory("ChainsawHitBlue", 1, "FireContinueBlue")
		SAWG A 0 A_JumpIfInventory("ChainsawHitGreen", 1, "FireContinueGreen")
		TNT1 A 5

		CSR1 MNO 1
		SAWG A 0 A_ReFire
		goto readytofire

	FireContinueRed:
		SAWG A 0
		SAWG A 0 A_TakeInventory("ChainsawHitRed", 1)
		SAWG A 0 A_TakeInventory("ChainsawHitBlue", 1)
		SAWG A 0 A_TakeInventory("ChainsawHitGreen", 1)
		SAWG A 0 A_CheckReload
		SAWG A 0 A_PlaySound("weapons/chainsaw/loop", 4)
		CSR1 R 2 A_Saw("", "", 10, "SSawPuff", SF_NORANDOM | SF_NOUSEAMMOMISS, 48, 3, 0)
		CSR1 R 0 A_FireCustomMissile("SawDamageHorizontal", 2, 0, 0, 0)
		SAWG A 0 A_JumpIfInventory("ChainsawHitRed", 1, "FireContinueRed")
		SAWG A 0 A_JumpIfInventory("ChainsawHitBlue", 1, "FireContinueBlue")
		SAWG A 0 A_JumpIfInventory("ChainsawHitGreen", 1, "FireContinueGreen")
		CSR1 S 2 A_Saw("", "", 10, "SSawPuff", SF_NORANDOM | SF_NOUSEAMMOMISS, 48, 3, 0)
		CSR1 S 0 A_FireCustomMissile("SawDamageHorizontal", 1, 0, 0, 0)
		SAWG A 0 A_JumpIfInventory("ChainsawHitRed", 1, "FireContinueRed")
		SAWG A 0 A_JumpIfInventory("ChainsawHitBlue", 1, "FireContinueBlue")
		SAWG A 0 A_JumpIfInventory("ChainsawHitGreen", 1, "FireContinueGreen")
		CSR1 T 2 A_Saw("", "", 10, "SSawPuff", SF_NORANDOM | SF_NOUSEAMMOMISS, 48, 3, 0)
		CSR1 T 0 A_FireCustomMissile("SawDamageHorizontal", -1, 0, 0, 0)
		SAWG A 0 A_JumpIfInventory("ChainsawHitRed", 1, "FireContinueRed")
		SAWG A 0 A_JumpIfInventory("ChainsawHitBlue", 1, "FireContinueBlue")
		SAWG A 0 A_JumpIfInventory("ChainsawHitGreen", 1, "FireContinueGreen")
		CSR1 U 2 A_Saw("", "", 10, "SSawPuff", SF_NORANDOM | SF_NOUSEAMMOMISS, 48, 3, 0)
		CSR1 U 0 A_FireCustomMissile("SawDamageHorizontal", -2, 0, 0, 0)
		SAWG A 0 A_JumpIfInventory("ChainsawHitRed", 1, "FireContinueRed")
		SAWG A 0 A_JumpIfInventory("ChainsawHitBlue", 1, "FireContinueBlue")
		SAWG A 0 A_JumpIfInventory("ChainsawHitGreen", 1, "FireContinueGreen")

		CSR1 IJ 1
		CSR1 KLM 2
		TNT1 A 5
		CSR1 MNO 2
		SAWG A 0 A_ReFire
		SAWG A 0 A_StopSound(4)
		goto Ready.Blood

	AltFire2Red:
		CSR2 ABCDDEEEF 1
		SAWG A 0 A_PlaySound("weapons/chainsaw/draw", 4)
		CSR2 GHI 1
		CSR2 J 2 A_Saw("", "", 10, "SSawPuff2", SF_NORANDOM | SF_NOUSEAMMOMISS, 48, 0, 3)
		CSR2 J 0 A_FireCustomMissile("SawDamageVertical", 0, 0, 0, 0, 0, 2)
		TNT1 A 0 A_GiveInventory("UsedStamina", 13)
		SAWG A 0 A_JumpIfInventory("ChainsawHitRed", 1, "AltContinue2Red")
		SAWG A 0 A_JumpIfInventory("ChainsawHitBlue", 1, "AltContinue2Blue")
		SAWG A 0 A_JumpIfInventory("ChainsawHitGreen", 1, "AltContinue2Green")
		CSR2 M 2 A_Saw("", "", 10, "SSawPuff2", SF_NORANDOM | SF_NOUSEAMMOMISS, 48, 0, 3)
		CSR2 M 0 A_FireCustomMissile("SawDamageVertical", 0, 0, 0, 0, 0, 1)
		SAWG A 0 A_JumpIfInventory("ChainsawHitRed", 1, "AltContinue2Red")
		SAWG A 0 A_JumpIfInventory("ChainsawHitBlue", 1, "AltContinue2Blue")
		SAWG A 0 A_JumpIfInventory("ChainsawHitGreen", 1, "AltContinue2Green")
		CSR2 N 2 A_Saw("", "", 10, "SSawPuff2", SF_NORANDOM | SF_NOUSEAMMOMISS, 48, 0, 3)
		CSR2 N 0 A_FireCustomMissile("SawDamageVertical", 0, 0, 0, 0, 0, -1)
		SAWG A 0 A_JumpIfInventory("ChainsawHitRed", 1, "AltContinue2Red")
		SAWG A 0 A_JumpIfInventory("ChainsawHitBlue", 1, "AltContinue2Blue")
		SAWG A 0 A_JumpIfInventory("ChainsawHitGreen", 1, "AltContinue2Green")
		CSR2 O 2 A_Saw("", "", 10, "SSawPuff2", SF_NORANDOM | SF_NOUSEAMMOMISS, 48, 0, 3)
		CSR2 O 0 A_FireCustomMissile("SawDamageVertical", 0, 0, 0, 0, 0, -2)
		SAWG A 0 A_JumpIfInventory("ChainsawHitRed", 1, "AltContinue2Red")
		SAWG A 0 A_JumpIfInventory("ChainsawHitBlue", 1, "AltContinue2Blue")
		SAWG A 0 A_JumpIfInventory("ChainsawHitGreen", 1, "AltContinue2Green")
		TNT1 A 5
		CSR2 PQ 1
		SAWG A 0 A_ReFire
		goto readytofire

	AltContinue2Red:
		SAWG A 0
		SAWG A 0 A_TakeInventory("ChainsawHitRed", 1)
		SAWG A 0 A_TakeInventory("ChainsawHitBlue", 1)
		SAWG A 0 A_TakeInventory("ChainsawHitGreen", 1)
		SAWG A 0 A_CheckReload
		SAWG A 0 A_PlaySound("weapons/chainsaw/loop", 4)
		CSR2 J 2 A_Saw("", "", 10, "SSawPuff2", SF_NORANDOM | SF_NOUSEAMMOMISS, 48, 0, 3)
		CSR2 J 0 A_FireCustomMissile("SawDamageVertical", 0, 0, 0, 0, 0, 1)
		SAWG A 0 A_JumpIfInventory("ChainsawHitRed", 1, "AltContinue2Red")
		SAWG A 0 A_JumpIfInventory("ChainsawHitBlue", 1, "AltContinue2Blue")
		SAWG A 0 A_JumpIfInventory("ChainsawHitGreen", 1, "AltContinue2Green")
		CSR2 K 2 A_Saw("", "", 10, "SSawPuff2", SF_NORANDOM | SF_NOUSEAMMOMISS, 48, 0, 3)
		CSR2 K 0 A_FireCustomMissile("SawDamageVertical", 0, 0, 0, 0, 0, 0)
		SAWG A 0 A_JumpIfInventory("ChainsawHitRed", 1, "AltContinue2Red")
		SAWG A 0 A_JumpIfInventory("ChainsawHitBlue", 1, "AltContinue2Blue")
		SAWG A 0 A_JumpIfInventory("ChainsawHitGreen", 1, "AltContinue2Green")
		CSR2 L 2 A_Saw("", "", 10, "SSawPuff2", SF_NORANDOM | SF_NOUSEAMMOMISS, 48, 0, 3)
		CSR2 L 0 A_FireCustomMissile("SawDamageVertical", 0, 0, 0, 0, 0, -1)
		SAWG A 0 A_JumpIfInventory("ChainsawHitRed", 1, "AltContinue2Red")
		SAWG A 0 A_JumpIfInventory("ChainsawHitBlue", 1, "AltContinue2Blue")
		SAWG A 0 A_JumpIfInventory("ChainsawHitGreen", 1, "AltContinue2Green")
		CSR2 MNO 1
		TNT1 A 5
		CSR2 PQ 1
		SAWG A 0 A_ReFire
		SAWG A 0 A_StopSound(4)
		goto Ready.Blood

	FireBlue:
		SAWG A 0
		SAWG A 0 A_PlaySoundEx("weapons/chainsaw/loop","Weapon",0)

		CSB1 ABCD 1
		SAWG A 0 A_PlaySound("weapons/chainsaw/draw", 4)
		CSB1 EFG 1
		CSB1 H 2 A_Saw("", "", 10, "SSawPuff", SF_NORANDOM | SF_NOUSEAMMOMISS, 48, 3, 0)
		CSB1 H 0 A_FireCustomMissile("SawDamageHorizontal", 2, 0, 0, 0)
		TNT1 A 0 A_GiveInventory("UsedStamina", 8)
		SAWG A 0 A_JumpIfInventory("ChainsawHitRed", 1, "FireContinueRed")
		SAWG A 0 A_JumpIfInventory("ChainsawHitBlue", 1, "FireContinueBlue")
		SAWG A 0 A_JumpIfInventory("ChainsawHitGreen", 1, "FireContinueGreen")
		CSB1 J 2 A_Saw("", "", 10, "SSawPuff", SF_NORANDOM | SF_NOUSEAMMOMISS, 48, 3, 0)
		CSB1 J 0 A_FireCustomMissile("SawDamageHorizontal", 1, 0, 0, 0)
		SAWG A 0 A_JumpIfInventory("ChainsawHitRed", 1, "FireContinueRed")
		SAWG A 0 A_JumpIfInventory("ChainsawHitBlue", 1, "FireContinueBlue")
		SAWG A 0 A_JumpIfInventory("ChainsawHitGreen", 1, "FireContinueGreen")
		CSB1 K 2 A_Saw("", "", 10, "SSawPuff", SF_NORANDOM | SF_NOUSEAMMOMISS, 48, 3, 0)
		CSB1 K 0 A_FireCustomMissile("SawDamageHorizontal", -1, 0, 0, 0)
		SAWG A 0 A_JumpIfInventory("ChainsawHitRed", 1, "FireContinueRed")
		SAWG A 0 A_JumpIfInventory("ChainsawHitBlue", 1, "FireContinueBlue")
		SAWG A 0 A_JumpIfInventory("ChainsawHitGreen", 1, "FireContinueGreen")
		CSB1 L 2 A_Saw("", "", 10, "SSawPuff", SF_NORANDOM | SF_NOUSEAMMOMISS, 48, 3, 0)
		CSB1 L 0 A_FireCustomMissile("SawDamageHorizontal", -2, 0, 0, 0)
		SAWG A 0 A_JumpIfInventory("ChainsawHitRed", 1, "FireContinueRed")
		SAWG A 0 A_JumpIfInventory("ChainsawHitBlue", 1, "FireContinueBlue")
		SAWG A 0 A_JumpIfInventory("ChainsawHitGreen", 1, "FireContinueGreen")
		TNT1 A 5

		CSB1 MNO 1
		SAWG A 0 A_ReFire
		goto readytofire

	FireContinueBlue:
		SAWG A 0
		SAWG A 0 A_TakeInventory("ChainsawHitRed", 1)
		SAWG A 0 A_TakeInventory("ChainsawHitBlue", 1)
		SAWG A 0 A_TakeInventory("ChainsawHitGreen", 1)
		SAWG A 0 A_CheckReload
		SAWG A 0 A_PlaySound("weapons/chainsaw/loop", 4)
		CSB1 R 2 A_Saw("", "", 10, "SSawPuff", SF_NORANDOM | SF_NOUSEAMMOMISS, 48, 3, 0)
		CSB1 R 0 A_FireCustomMissile("SawDamageHorizontal", 2, 0, 0, 0)
		SAWG A 0 A_JumpIfInventory("ChainsawHitRed", 1, "FireContinueRed")
		SAWG A 0 A_JumpIfInventory("ChainsawHitBlue", 1, "FireContinueBlue")
		SAWG A 0 A_JumpIfInventory("ChainsawHitGreen", 1, "FireContinueGreen")
		CSB1 S 2 A_Saw("", "", 10, "SSawPuff", SF_NORANDOM | SF_NOUSEAMMOMISS, 48, 3, 0)
		CSB1 S 0 A_FireCustomMissile("SawDamageHorizontal", 1, 0, 0, 0)
		SAWG A 0 A_JumpIfInventory("ChainsawHitRed", 1, "FireContinueRed")
		SAWG A 0 A_JumpIfInventory("ChainsawHitBlue", 1, "FireContinueBlue")
		SAWG A 0 A_JumpIfInventory("ChainsawHitGreen", 1, "FireContinueGreen")
		CSB1 T 2 A_Saw("", "", 10, "SSawPuff", SF_NORANDOM | SF_NOUSEAMMOMISS, 48, 3, 0)
		CSB1 T 0 A_FireCustomMissile("SawDamageHorizontal", -1, 0, 0, 0)
		SAWG A 0 A_JumpIfInventory("ChainsawHitRed", 1, "FireContinueRed")
		SAWG A 0 A_JumpIfInventory("ChainsawHitBlue", 1, "FireContinueBlue")
		SAWG A 0 A_JumpIfInventory("ChainsawHitGreen", 1, "FireContinueGreen")
		CSB1 U 2 A_Saw("", "", 10, "SSawPuff", SF_NORANDOM | SF_NOUSEAMMOMISS, 48, 3, 0)
		CSB1 U 0 A_FireCustomMissile("SawDamageHorizontal", -2, 0, 0, 0)
		SAWG A 0 A_JumpIfInventory("ChainsawHitRed", 1, "FireContinueRed")
		SAWG A 0 A_JumpIfInventory("ChainsawHitBlue", 1, "FireContinueBlue")
		SAWG A 0 A_JumpIfInventory("ChainsawHitGreen", 1, "FireContinueGreen")

		CSB1 IJ 1
		CSB1 KLM 2
		TNT1 A 5
		CSB1 MNO 2
		SAWG A 0 A_ReFire
		SAWG A 0 A_StopSound(4)
		goto Ready.BlueBlood

	AltFire2Blue:
		CSB2 ABCDDEEEF 1
		SAWG A 0 A_PlaySound("weapons/chainsaw/draw", 4)
		CSB2 GHI 1
		CSB2 J 2 A_Saw("", "", 10, "SSawPuff2", SF_NORANDOM | SF_NOUSEAMMOMISS, 48, 0, 3)
		CSB2 J 0 A_FireCustomMissile("SawDamageVertical", 0, 0, 0, 0, 0, 2)
		TNT1 A 0 A_GiveInventory("UsedStamina", 13)
		SAWG A 0 A_JumpIfInventory("ChainsawHitRed", 1, "AltContinue2Red")
		SAWG A 0 A_JumpIfInventory("ChainsawHitBlue", 1, "AltContinue2Blue")
		SAWG A 0 A_JumpIfInventory("ChainsawHitGreen", 1, "AltContinue2Green")
		CSB2 M 2 A_Saw("", "", 10, "SSawPuff2", SF_NORANDOM | SF_NOUSEAMMOMISS, 48, 0, 3)
		CSB2 M 0 A_FireCustomMissile("SawDamageVertical", 0, 0, 0, 0, 0, 1)
		SAWG A 0 A_JumpIfInventory("ChainsawHitRed", 1, "AltContinue2Red")
		SAWG A 0 A_JumpIfInventory("ChainsawHitBlue", 1, "AltContinue2Blue")
		SAWG A 0 A_JumpIfInventory("ChainsawHitGreen", 1, "AltContinue2Green")
		CSB2 N 2 A_Saw("", "", 10, "SSawPuff2", SF_NORANDOM | SF_NOUSEAMMOMISS, 48, 0, 3)
		CSB2 N 0 A_FireCustomMissile("SawDamageVertical", 0, 0, 0, 0, 0, -1)
		SAWG A 0 A_JumpIfInventory("ChainsawHitRed", 1, "AltContinue2Red")
		SAWG A 0 A_JumpIfInventory("ChainsawHitBlue", 1, "AltContinue2Blue")
		SAWG A 0 A_JumpIfInventory("ChainsawHitGreen", 1, "AltContinue2Green")
		CSB2 O 2 A_Saw("", "", 10, "SSawPuff2", SF_NORANDOM | SF_NOUSEAMMOMISS, 48, 0, 3)
		CSB2 O 0 A_FireCustomMissile("SawDamageVertical", 0, 0, 0, 0, 0, -2)
		SAWG A 0 A_JumpIfInventory("ChainsawHitRed", 1, "AltContinue2Red")
		SAWG A 0 A_JumpIfInventory("ChainsawHitBlue", 1, "AltContinue2Blue")
		SAWG A 0 A_JumpIfInventory("ChainsawHitGreen", 1, "AltContinue2Green")
		TNT1 A 5
		CSB2 PQ 1
		SAWG A 0 A_ReFire
		goto readytofire

	AltContinue2Blue:
		SAWG A 0
		SAWG A 0 A_TakeInventory("ChainsawHitRed", 1)
		SAWG A 0 A_TakeInventory("ChainsawHitBlue", 1)
		SAWG A 0 A_TakeInventory("ChainsawHitGreen", 1)
		SAWG A 0 A_CheckReload
		SAWG A 0 A_PlaySound("weapons/chainsaw/loop", 4)
		CSB2 J 2 A_Saw("", "", 10, "SSawPuff2", SF_NORANDOM | SF_NOUSEAMMOMISS, 48, 0, 3)
		CSB2 J 0 A_FireCustomMissile("SawDamageVertical", 0, 0, 0, 0, 0, 1)
		SAWG A 0 A_JumpIfInventory("ChainsawHitRed", 1, "AltContinue2Red")
		SAWG A 0 A_JumpIfInventory("ChainsawHitBlue", 1, "AltContinue2Blue")
		SAWG A 0 A_JumpIfInventory("ChainsawHitGreen", 1, "AltContinue2Green")
		CSB2 K 2 A_Saw("", "", 10, "SSawPuff2", SF_NORANDOM | SF_NOUSEAMMOMISS, 48, 0, 3)
		CSB2 K 0 A_FireCustomMissile("SawDamageVertical", 0, 0, 0, 0, 0, 0)
		SAWG A 0 A_JumpIfInventory("ChainsawHitRed", 1, "AltContinue2Red")
		SAWG A 0 A_JumpIfInventory("ChainsawHitBlue", 1, "AltContinue2Blue")
		SAWG A 0 A_JumpIfInventory("ChainsawHitGreen", 1, "AltContinue2Green")
		CSB2 L 2 A_Saw("", "", 10, "SSawPuff2", SF_NORANDOM | SF_NOUSEAMMOMISS, 48, 0, 3)
		CSB2 L 0 A_FireCustomMissile("SawDamageVertical", 0, 0, 0, 0, 0, -1)
		SAWG A 0 A_JumpIfInventory("ChainsawHitRed", 1, "AltContinue2Red")
		SAWG A 0 A_JumpIfInventory("ChainsawHitBlue", 1, "AltContinue2Blue")
		SAWG A 0 A_JumpIfInventory("ChainsawHitGreen", 1, "AltContinue2Green")
		CSB2 MNO 1
		TNT1 A 5
		CSB2 PQ 1
		SAWG A 0 A_ReFire
		SAWG A 0 A_StopSound(4)
		goto Ready.BlueBlood

   Firegreen:
		SAWG A 0
		SAWG A 0 A_PlaySoundEx("weapons/chainsaw/loop","Weapon",0)

		CSG1 ABCD 1
		SAWG A 0 A_PlaySound("weapons/chainsaw/draw", 4)
		CSG1 EFG 1
		CSG1 H 2 A_Saw("", "", 10, "SSawPuff", SF_NORANDOM | SF_NOUSEAMMOMISS, 48, 3, 0)
		CSG1 H 0 A_FireCustomMissile("SawDamageHorizontal", 2, 0, 0, 0)
		TNT1 A 0 A_GiveInventory("UsedStamina", 8)
		SAWG A 0 A_JumpIfInventory("ChainsawHitRed", 1, "FireContinueRed")
		SAWG A 0 A_JumpIfInventory("ChainsawHitBlue", 1, "FireContinueBlue")
		SAWG A 0 A_JumpIfInventory("ChainsawHitGreen", 1, "FireContinueGreen")
		CSG1 J 2 A_Saw("", "", 10, "SSawPuff", SF_NORANDOM | SF_NOUSEAMMOMISS, 48, 3, 0)
		CSG1 J 0 A_FireCustomMissile("SawDamageHorizontal", 1, 0, 0, 0)
		SAWG A 0 A_JumpIfInventory("ChainsawHitRed", 1, "FireContinueRed")
		SAWG A 0 A_JumpIfInventory("ChainsawHitBlue", 1, "FireContinueBlue")
		SAWG A 0 A_JumpIfInventory("ChainsawHitGreen", 1, "FireContinueGreen")
		CSG1 K 2 A_Saw("", "", 10, "SSawPuff", SF_NORANDOM | SF_NOUSEAMMOMISS, 48, 3, 0)
		CSG1 K 0 A_FireCustomMissile("SawDamageHorizontal", -1, 0, 0, 0)
		SAWG A 0 A_JumpIfInventory("ChainsawHitRed", 1, "FireContinueRed")
		SAWG A 0 A_JumpIfInventory("ChainsawHitBlue", 1, "FireContinueBlue")
		SAWG A 0 A_JumpIfInventory("ChainsawHitGreen", 1, "FireContinueGreen")
		CSG1 L 2 A_Saw("", "", 10, "SSawPuff", SF_NORANDOM | SF_NOUSEAMMOMISS, 48, 3, 0)
		CSG1 L 0 A_FireCustomMissile("SawDamageHorizontal", -2, 0, 0, 0)
		SAWG A 0 A_JumpIfInventory("ChainsawHitRed", 1, "FireContinueRed")
		SAWG A 0 A_JumpIfInventory("ChainsawHitBlue", 1, "FireContinueBlue")
		SAWG A 0 A_JumpIfInventory("ChainsawHitGreen", 1, "FireContinueGreen")
		TNT1 A 5

		CSG1 MNO 1
		SAWG A 0 A_ReFire
		goto readytofire

	FireContinuegreen:
		SAWG A 0
		SAWG A 0 A_TakeInventory("ChainsawHitRed", 1)
		SAWG A 0 A_TakeInventory("ChainsawHitBlue", 1)
		SAWG A 0 A_TakeInventory("ChainsawHitGreen", 1)
		SAWG A 0 A_CheckReload
		SAWG A 0 A_PlaySound("weapons/chainsaw/loop", 4)
		CSG1 R 2 A_Saw("", "", 10, "SSawPuff", SF_NORANDOM | SF_NOUSEAMMOMISS, 48, 3, 0)
		CSG1 R 0 A_FireCustomMissile("SawDamageHorizontal", 2, 0, 0, 0)
		SAWG A 0 A_JumpIfInventory("ChainsawHitRed", 1, "FireContinueRed")
		SAWG A 0 A_JumpIfInventory("ChainsawHitBlue", 1, "FireContinueBlue")
		SAWG A 0 A_JumpIfInventory("ChainsawHitGreen", 1, "FireContinueGreen")
		CSG1 S 2 A_Saw("", "", 10, "SSawPuff", SF_NORANDOM | SF_NOUSEAMMOMISS, 48, 3, 0)
		CSG1 S 0 A_FireCustomMissile("SawDamageHorizontal", 1, 0, 0, 0)
		SAWG A 0 A_JumpIfInventory("ChainsawHitRed", 1, "FireContinueRed")
		SAWG A 0 A_JumpIfInventory("ChainsawHitBlue", 1, "FireContinueBlue")
		SAWG A 0 A_JumpIfInventory("ChainsawHitGreen", 1, "FireContinueGreen")
		CSG1 T 2 A_Saw("", "", 10, "SSawPuff", SF_NORANDOM | SF_NOUSEAMMOMISS, 48, 3, 0)
		CSG1 T 0 A_FireCustomMissile("SawDamageHorizontal", -1, 0, 0, 0)
		SAWG A 0 A_JumpIfInventory("ChainsawHitRed", 1, "FireContinueRed")
		SAWG A 0 A_JumpIfInventory("ChainsawHitBlue", 1, "FireContinueBlue")
		SAWG A 0 A_JumpIfInventory("ChainsawHitGreen", 1, "FireContinueGreen")
		CSG1 U 2 A_Saw("", "", 10, "SSawPuff", SF_NORANDOM | SF_NOUSEAMMOMISS, 48, 3, 0)
		CSG1 U 0 A_FireCustomMissile("SawDamageHorizontal", -2, 0, 0, 0)
		SAWG A 0 A_JumpIfInventory("ChainsawHitRed", 1, "FireContinueRed")
		SAWG A 0 A_JumpIfInventory("ChainsawHitBlue", 1, "FireContinueBlue")
		SAWG A 0 A_JumpIfInventory("ChainsawHitGreen", 1, "FireContinueGreen")

		CSG1 IJ 1
		CSG1 KLM 2
		TNT1 A 5
		CSG1 MNO 2
		SAWG A 0 A_ReFire
		SAWG A 0 A_StopSound(4)
		goto Ready.GreenBlood

	AltFire2Green:
		CSG2 ABCDDEEEF 1
		SAWG A 0 A_PlaySound("weapons/chainsaw/draw", 4)
		CSG2 GHI 1
		CSG2 J 2 A_Saw("", "", 10, "SSawPuff2", SF_NORANDOM | SF_NOUSEAMMOMISS, 48, 0, 3)
		CSG2 J 0 A_FireCustomMissile("SawDamageVertical", 0, 0, 0, 0, 0, 2)
		TNT1 A 0 A_GiveInventory("UsedStamina", 13)
		SAWG A 0 A_JumpIfInventory("ChainsawHitRed", 1, "AltContinue2Red")
		SAWG A 0 A_JumpIfInventory("ChainsawHitBlue", 1, "AltContinue2Blue")
		SAWG A 0 A_JumpIfInventory("ChainsawHitGreen", 1, "AltContinue2Green")
		CSG2 M 2 A_Saw("", "", 10, "SSawPuff2", SF_NORANDOM | SF_NOUSEAMMOMISS, 48, 0, 3)
		CSG2 M 0 A_FireCustomMissile("SawDamageVertical", 0, 0, 0, 0, 0, 1)
		SAWG A 0 A_JumpIfInventory("ChainsawHitRed", 1, "AltContinue2Red")
		SAWG A 0 A_JumpIfInventory("ChainsawHitBlue", 1, "AltContinue2Blue")
		SAWG A 0 A_JumpIfInventory("ChainsawHitGreen", 1, "AltContinue2Green")
		CSG2 N 2 A_Saw("", "", 10, "SSawPuff2", SF_NORANDOM | SF_NOUSEAMMOMISS, 48, 0, 3)
		CSG2 N 0 A_FireCustomMissile("SawDamageVertical", 0, 0, 0, 0, 0, -1)
		SAWG A 0 A_JumpIfInventory("ChainsawHitRed", 1, "AltContinue2Red")
		SAWG A 0 A_JumpIfInventory("ChainsawHitBlue", 1, "AltContinue2Blue")
		SAWG A 0 A_JumpIfInventory("ChainsawHitGreen", 1, "AltContinue2Green")
		CSG2 O 2 A_Saw("", "", 10, "SSawPuff2", SF_NORANDOM | SF_NOUSEAMMOMISS, 48, 0, 3)
		CSG2 O 0 A_FireCustomMissile("SawDamageVertical", 0, 0, 0, 0, 0, -2)
		SAWG A 0 A_JumpIfInventory("ChainsawHitRed", 1, "AltContinue2Red")
		SAWG A 0 A_JumpIfInventory("ChainsawHitBlue", 1, "AltContinue2Blue")
		SAWG A 0 A_JumpIfInventory("ChainsawHitGreen", 1, "AltContinue2Green")
		TNT1 A 5
		CSG2 PQ 1
		SAWG A 0 A_ReFire
		goto readytofire

	AltContinue2Green:
		SAWG A 0
		SAWG A 0 A_TakeInventory("ChainsawHitRed", 1)
		SAWG A 0 A_TakeInventory("ChainsawHitBlue", 1)
		SAWG A 0 A_TakeInventory("ChainsawHitGreen", 1)
		SAWG A 0 A_CheckReload
		SAWG A 0 A_PlaySound("weapons/chainsaw/loop", 4)
		CSG2 J 2 A_Saw("", "", 10, "SSawPuff2", SF_NORANDOM | SF_NOUSEAMMOMISS, 48, 0, 3)
		CSG2 J 0 A_FireCustomMissile("SawDamageVertical", 0, 0, 0, 0, 0, 1)
		SAWG A 0 A_JumpIfInventory("ChainsawHitRed", 1, "AltContinue2Red")
		SAWG A 0 A_JumpIfInventory("ChainsawHitBlue", 1, "AltContinue2Blue")
		SAWG A 0 A_JumpIfInventory("ChainsawHitGreen", 1, "AltContinue2Green")
		CSG2 K 2 A_Saw("", "", 10, "SSawPuff2", SF_NORANDOM | SF_NOUSEAMMOMISS, 48, 0, 3)
		CSG2 K 0 A_FireCustomMissile("SawDamageVertical", 0, 0, 0, 0, 0, 0)
		SAWG A 0 A_JumpIfInventory("ChainsawHitRed", 1, "AltContinue2Red")
		SAWG A 0 A_JumpIfInventory("ChainsawHitBlue", 1, "AltContinue2Blue")
		SAWG A 0 A_JumpIfInventory("ChainsawHitGreen", 1, "AltContinue2Green")
		CSG2 L 2 A_Saw("", "", 10, "SSawPuff2", SF_NORANDOM | SF_NOUSEAMMOMISS, 48, 0, 3)
		CSG2 L 0 A_FireCustomMissile("SawDamageVertical", 0, 0, 0, 0, 0, -1)
		SAWG A 0 A_JumpIfInventory("ChainsawHitRed", 1, "AltContinue2Red")
		SAWG A 0 A_JumpIfInventory("ChainsawHitBlue", 1, "AltContinue2Blue")
		SAWG A 0 A_JumpIfInventory("ChainsawHitGreen", 1, "AltContinue2Green")
		CSG2 MNO 1
		TNT1 A 5
		CSG2 PQ 1
		SAWG A 0 A_ReFire
		SAWG A 0 A_StopSound(4)
		goto Ready.GreenBlood

	StartSprint:
		SAWG A 0
		SAWG A 0 A_JumpIfInventory("PowerBloodOnVisor", 1, "StartSprint.Blood")
		SAWG A 0 A_JumpIfInventory("PowerBlueBloodOnVisor", 1, "StartSprint.BlueBlood")
		SAWG A 0 A_JumpIfInventory("PowerGreenBloodOnVisor", 1, "StartSprint.GreenBlood")
		SAWG A 1 A_WeaponReady
		SHTN A 0 A_Takeinventory("Zoomed",1)
        SHTN A 0 A_ZoomFactor(1.0)
		SHTN A 0 A_Takeinventory("ADSmode",1)
		RIFG A 0 A_SetCrosshair(0)
		SHTN A 0 A_Giveinventory("GoSpecial",1)
		TNT1 A 0 ACS_NamedExecuteAlways("BDSprint", 0, 0, 0, 0)//Makes player faster.

	Sprinting:
		SAWG A 0
		SAWG A 0 A_playsoundex("weapons/chainsaw/idle", 6)
		SAWG A 1 offset(-9,34) A_SetPitch(pitch -0.5)
		SAWG A 1 offset(-6,36) A_SetPitch(pitch -0.5)
		SAWG A 1 offset(-3,38) A_SetPitch(pitch -0.5)
		SAWG A 1 offset(0,38) A_SetPitch(pitch -0.5)
		SAWG A 1 offset(3,36) A_SetPitch(pitch -0.5)
		SAWG A 1 offset(6,34) A_SetPitch(pitch -0.5)
		SAWG A 1 offset(9,32) A_SetPitch(pitch -0.5)
		TNT1 A 0 A_GiveInventory("UsedStamina", 2)
		SMGG A 0 A_WeaponReady(WRF_NOBOB)
		SMGG A 0 A_JumpIfInventory("Kicking",1,"DoKick")
        SMGG A 0 A_JumpIfInventory("Taunting",1,"Taunt")
        SMGG A 0 A_JumpIfInventory("Reloading",1,"Reload")

		SAWG A 0 A_playsoundex("weapons/chainsaw/idle", 6)
		SAWG A 1 offset(9,34) A_SetPitch(pitch +0.5)
		SAWG A 1 offset(6,36) A_SetPitch(pitch +0.5)
		SAWG A 1 offset(3,38) A_SetPitch(pitch +0.5)
		SAWG A 1 offset(0,38) A_SetPitch(pitch +0.5)
		SAWG A 1 offset(-3,36) A_SetPitch(pitch +0.5)
		SAWG A 1 offset(-6,34) A_SetPitch(pitch +0.5)
		SAWG A 1 offset(-9,32) A_SetPitch(pitch +0.5)
		TNT1 A 0 A_GiveInventory("UsedStamina", 2)
		SMGG A 0 A_WeaponReady(WRF_NOBOB)
		SMGG A 0 A_JumpIfInventory("Kicking",1,"DoKick")
        SMGG A 0 A_JumpIfInventory("Taunting",1,"Taunt")
        SMGG A 0 A_JumpIfInventory("Reloading",1,"Reload")

		PLAY A 0 ACS_NamedExecuteAlways("BDSprint", 0, 0, 0, 0)//Makes player faster.
		SMGG A 0 A_JumpIfInventory("IsRunning", 1, "Sprinting")
		Goto StopSprint

	StartSprint.Blood:
		SAW2 A 1 A_WeaponReady
		SHTN A 0 A_Takeinventory("Zoomed",1)
        SHTN A 0 A_ZoomFactor(1.0)
		SHTN A 0 A_Takeinventory("ADSmode",1)
		RIFG A 0 A_SetCrosshair(0)
		SHTN A 0 A_Giveinventory("GoSpecial",1)
		TNT1 A 0 ACS_NamedExecuteAlways("BDSprint", 0, 0, 0, 0)//Makes player faster.

	Sprinting.Blood:
		CSR2 Q 0
		CSR2 Q 0 A_playsoundex("weapons/chainsaw/idle", 6)
		CSR2 Q 1 offset(-9,34) A_SetPitch(pitch -0.5)
		CSR2 Q 1 offset(-6,36) A_SetPitch(pitch -0.5)
		CSR2 Q 1 offset(-3,38) A_SetPitch(pitch -0.5)
		CSR2 Q 1 offset(0,38) A_SetPitch(pitch -0.5)
		CSR2 Q 1 offset(3,36) A_SetPitch(pitch -0.5)
		CSR2 Q 1 offset(6,34) A_SetPitch(pitch -0.5)
		CSR2 Q 1 offset(9,32) A_SetPitch(pitch -0.5)
		TNT1 A 0 A_GiveInventory("UsedStamina", 2)
		SMGG A 0 A_WeaponReady(WRF_NOBOB)
		SMGG A 0 A_JumpIfInventory("Kicking",1,"DoKick")
        SMGG A 0 A_JumpIfInventory("Taunting",1,"Taunt")
        SMGG A 0 A_JumpIfInventory("Reloading",1,"Reload")

		CSR2 Q 0 A_playsoundex("weapons/chainsaw/idle", 6)
		CSR2 Q 1 offset(9,34) A_SetPitch(pitch +0.5)
		CSR2 Q 1 offset(6,36) A_SetPitch(pitch +0.5)
		CSR2 Q 1 offset(3,38) A_SetPitch(pitch +0.5)
		CSR2 Q 1 offset(0,38) A_SetPitch(pitch +0.5)
		CSR2 Q 1 offset(-3,36) A_SetPitch(pitch +0.5)
		CSR2 Q 1 offset(-6,34) A_SetPitch(pitch +0.5)
		CSR2 Q 1 offset(-9,32) A_SetPitch(pitch +0.5)
		TNT1 A 0 A_GiveInventory("UsedStamina", 2)
		SMGG A 0 A_WeaponReady(WRF_NOBOB)
		SMGG A 0 A_JumpIfInventory("Kicking",1,"DoKick")
        SMGG A 0 A_JumpIfInventory("Taunting",1,"Taunt")
        SMGG A 0 A_JumpIfInventory("Reloading",1,"Reload")

		PLAY A 0 ACS_NamedExecuteAlways("BDSprint", 0, 0, 0, 0)//Makes player faster.
		SMGG A 0 A_JumpIfInventory("IsRunning", 1, "Sprinting.Blood")
		Goto StopSprint.Blood

	StartSprint.GreenBlood:
		SAW3 A 1 A_WeaponReady
		SHTN A 0 A_Takeinventory("Zoomed",1)
        SHTN A 0 A_ZoomFactor(1.0)
		SHTN A 0 A_Takeinventory("ADSmode",1)
		RIFG A 0 A_SetCrosshair(0)
		SHTN A 0 A_Giveinventory("GoSpecial",1)
		TNT1 A 0 ACS_NamedExecuteAlways("BDSprint", 0, 0, 0, 0)//Makes player faster.

	Sprinting.GreenBlood:
		CSG2 Q 0
		CSG2 Q 0 A_playsoundex("weapons/chainsaw/idle", 6)
		CSG2 Q 1 offset(-9,34) A_SetPitch(pitch -0.5)
		CSG2 Q 1 offset(-6,36) A_SetPitch(pitch -0.5)
		CSG2 Q 1 offset(-3,38) A_SetPitch(pitch -0.5)
		CSG2 Q 1 offset(0,38) A_SetPitch(pitch -0.5)
		CSG2 Q 1 offset(3,36) A_SetPitch(pitch -0.5)
		CSG2 Q 1 offset(6,34) A_SetPitch(pitch -0.5)
		CSG2 Q 1 offset(9,32) A_SetPitch(pitch -0.5)
		TNT1 A 0 A_GiveInventory("UsedStamina", 2)
		SMGG A 0 A_WeaponReady(WRF_NOBOB)
		SMGG A 0 A_JumpIfInventory("Kicking",1,"DoKick")
        SMGG A 0 A_JumpIfInventory("Taunting",1,"Taunt")
        SMGG A 0 A_JumpIfInventory("Reloading",1,"Reload")

		CSG2 Q 0 A_playsoundex("weapons/chainsaw/idle", 6)
		CSG2 Q 1 offset(9,34) A_SetPitch(pitch +0.5)
		CSG2 Q 1 offset(6,36) A_SetPitch(pitch +0.5)
		CSG2 Q 1 offset(3,38) A_SetPitch(pitch +0.5)
		CSG2 Q 1 offset(0,38) A_SetPitch(pitch +0.5)
		CSG2 Q 1 offset(-3,36) A_SetPitch(pitch +0.5)
		CSG2 Q 1 offset(-6,34) A_SetPitch(pitch +0.5)
		CSG2 Q 1 offset(-9,32) A_SetPitch(pitch +0.5)
		TNT1 A 0 A_GiveInventory("UsedStamina", 2)
		SMGG A 0 A_WeaponReady(WRF_NOBOB)
		SMGG A 0 A_JumpIfInventory("Kicking",1,"DoKick")
        SMGG A 0 A_JumpIfInventory("Taunting",1,"Taunt")
        SMGG A 0 A_JumpIfInventory("Reloading",1,"Reload")

		PLAY A 0 ACS_NamedExecuteAlways("BDSprint", 0, 0, 0, 0)//Makes player faster.
		SMGG A 0 A_JumpIfInventory("IsRunning", 1, "Sprinting.GreenBlood")
		Goto StopSprint.GreenBlood

	StartSprint.BlueBlood:
		SAW4 A 1 A_WeaponReady
		SHTN A 0 A_Takeinventory("Zoomed",1)
        SHTN A 0 A_ZoomFactor(1.0)
		SHTN A 0 A_Takeinventory("ADSmode",1)
		RIFG A 0 A_SetCrosshair(0)
		SHTN A 0 A_Giveinventory("GoSpecial",1)
		TNT1 A 0 ACS_NamedExecuteAlways("BDSprint", 0, 0, 0, 0)//Makes player faster.

	Sprinting.BlueBlood:
		CSB2 Q 0
		CSB2 Q 0 A_playsoundex("weapons/chainsaw/idle", 6)
		CSB2 Q 1 offset(-9,34) A_SetPitch(pitch -0.5)
		CSB2 Q 1 offset(-6,36) A_SetPitch(pitch -0.5)
		CSB2 Q 1 offset(-3,38) A_SetPitch(pitch -0.5)
		CSB2 Q 1 offset(0,38) A_SetPitch(pitch -0.5)
		CSB2 Q 1 offset(3,36) A_SetPitch(pitch -0.5)
		CSB2 Q 1 offset(6,34) A_SetPitch(pitch -0.5)
		CSB2 Q 1 offset(9,32) A_SetPitch(pitch -0.5)
		TNT1 A 0 A_GiveInventory("UsedStamina", 2)
		SMGG A 0 A_WeaponReady(WRF_NOBOB)
		SMGG A 0 A_JumpIfInventory("Kicking",1,"DoKick")
        SMGG A 0 A_JumpIfInventory("Taunting",1,"Taunt")
        SMGG A 0 A_JumpIfInventory("Reloading",1,"Reload")

		CSB2 Q 0 A_playsoundex("weapons/chainsaw/idle", 6)
		CSB2 Q 1 offset(9,34) A_SetPitch(pitch +0.5)
		CSB2 Q 1 offset(6,36) A_SetPitch(pitch +0.5)
		CSB2 Q 1 offset(3,38) A_SetPitch(pitch +0.5)
		CSB2 Q 1 offset(0,38) A_SetPitch(pitch +0.5)
		CSB2 Q 1 offset(-3,36) A_SetPitch(pitch +0.5)
		CSB2 Q 1 offset(-6,34) A_SetPitch(pitch +0.5)
		CSB2 Q 1 offset(-9,32) A_SetPitch(pitch +0.5)
		TNT1 A 0 A_GiveInventory("UsedStamina", 2)
		SMGG A 0 A_WeaponReady(WRF_NOBOB)
		SMGG A 0 A_JumpIfInventory("Kicking",1,"DoKick")
        SMGG A 0 A_JumpIfInventory("Taunting",1,"Taunt")
        SMGG A 0 A_JumpIfInventory("Reloading",1,"Reload")

		PLAY A 0 ACS_NamedExecuteAlways("BDSprint", 0, 0, 0, 0)//Makes player faster.
		SMGG A 0 A_JumpIfInventory("IsRunning", 1, "Sprinting.BlueBlood")
		Goto StopSprint.BlueBlood

	StopSprint:
		SAWG A 0 A_JumpIfInventory("PowerStrength", 1, 2)
		SAWG A 0 A_JumpIfInventory("UsedStamina", 100, "StopSprintTired")
		SAWG A 1 ACS_NamedExecuteAlways("BDTacticalSpeed", 0, 0, 0, 0)//Makes player slower.
		Goto Ready3

	StopSprint.Blood:
		CSR2 Q 0 A_JumpIfInventory("PowerStrength", 1, 2)
		CSR2 Q 0 A_JumpIfInventory("UsedStamina", 100, "StopSprintTired.Blood")
		CSR2 Q 1 ACS_NamedExecuteAlways("BDTacticalSpeed", 0, 0, 0, 0)//Makes player slower.
		Goto Ready3

	StopSprint.GreenBlood:
		CSG2 Q 0 A_JumpIfInventory("PowerStrength", 1, 2)
		CSG2 Q 0 A_JumpIfInventory("UsedStamina", 100, "StopSprintTired.GreenBlood")
		CSG2 Q 1 ACS_NamedExecuteAlways("BDTacticalSpeed", 0, 0, 0, 0)//Makes player slower.
		Goto Ready3

	StopSprint.BlueBlood:
		CSB2 Q 0 A_JumpIfInventory("PowerStrength", 1, 2)
		CSB2 Q 0 A_JumpIfInventory("UsedStamina", 100, "StopSprintTired.BlueBlood")
		CSB2 Q 1 ACS_NamedExecuteAlways("BDTacticalSpeed", 0, 0, 0, 0)//Makes player slower.
		Goto Ready3

	StopSprintTired:
		SAWG A 1 ACS_NamedExecuteAlways("BDTacticalSpeed", 0, 0, 0, 0)//Makes player slower.
		SAWG A 0 A_PlaySound("Tired", 2)
		Goto Ready3

	StopSprintTired.Blood:
		CSR2 Q 1 ACS_NamedExecuteAlways("BDTacticalSpeed", 0, 0, 0, 0)//Makes player slower.
		CSR2 Q 0 A_PlaySound("Tired", 2)
		Goto Ready3

	StopSprintTired.GreenBlood:
		CSG2 Q 1 ACS_NamedExecuteAlways("BDTacticalSpeed", 0, 0, 0, 0)//Makes player slower.
		CSG2 Q 0 A_PlaySound("Tired", 2)
		Goto Ready3

	StopSprintTired.BlueBlood:
		CSB2 Q 1 ACS_NamedExecuteAlways("BDTacticalSpeed", 0, 0, 0, 0)//Makes player slower.
		CSB2 Q 0 A_PlaySound("Tired", 2)
		Goto Ready3
	}
}

ACTOR SawDamageHorizontal: FastProjectile
{
	Radius 16
	Height 8
	DamageType Saw
	Projectile
	+FORCEXYBILLBOARD
	+EXTREMEDEATH
	+BLOODSPLATTER
	+THRUSPECIES
	RenderStyle Add
	Alpha 0.6
	Scale 0.15
    Damage (random(15,15))
    Speed 48
	//HitObituary "$OB_IMPHIT"
	SeeSound "none"
	DeathSound "none"
	Decal "none"
	decal "SawHorizontal"
	Species "Marines"
	States
	{
	Spawn:
		SAWG A 0 BRIGHT
        TNT1 A 1
		Stop
	XDeath:
		SAWG A 0
		TNT1 A 1 Radius_Quake(1, 7, 0, 1, 0)
		SAWG A 0 A_PlaySound("CSAWFLESH", 1)
		TNT1 A 10
		Stop
	Death:
	Crash:
		TNT1 A 0
		TNT1 AB 1 bright
		TNT1 A 0 A_Jump (128,3)
		TNT1 A 0 A_SpawnItem ("Sparks", 0)
		TNT1 AAAAAA 0 A_CustomMissile ("SparkX", 2, 0, random (0, 360), 2, random (30, 170))
		BPUF C 1 bright A_PlaySound("weapons/chainsaw/hitwall")
		BPUF D 1 bright
		Stop
	}
}

ACTOR SawDamageHorizontal2: SawDamageHorizontal
{
	-BLOODSPLATTER
	+BLOODLESSIMPACT
}

ACTOR SawDamageVertical: SawDamageHorizontal
{
	DamageType Saw
	decal "SawVertical"
	Radius 8
	Height 16
}

ACTOR SawDamageVertical2: SawDamageVertical
{
	-BLOODSPLATTER
	+BLOODLESSIMPACT
}