Actor KyleBlasterRifle : Weapon 30001
{
     Weapon.AmmoType1 "EnergyUnits"
	 Weapon.AmmoUse1 2
	 Weapon.AmmoGive1 15
	 Inventory.PickupMessage "Blaster Rifle"
     Inventory.PickupSound "ItemPickup"
	 Weapon.BobStyle InverseSmooth
	 Weapon.BobSpeed 0.9
	 +AMMO_OPTIONAL
     States
	 {
	 Ready:
	    DF02 A 1 A_WeaponReady
		Loop
	//-------Spesial Select and Deselect animations, using offset------//	
	 Select:
	    NULL A 0 A_PlaySound("WeaponSelect")
		DF02 A 1 offset(27, 68)
		DF02 A 1 offset(21, 60)
		DF02 A 1 offset(15, 52)
		DF02 A 1 offset(9, 44)
		DF02 A 1 offset(3, 36)	
		DF02 AAAAAAAAAAAAAAAAAAAA 0 A_Raise
	    DF02 A 1 A_Raise
	    Goto Select+5
	  Deselect:
	    DF02 A 1 offset(3, 36)
		DF02 A 1 offset(9, 44)
		DF02 A 1 offset(15, 52)
		DF02 A 1 offset(21, 60)
		DF02 A 1 offset(27, 68)
		TNT1 A 0 A_TakeInventory("UseAmmo", 999)
		DF02 AAAAAAAAAAAAAAAAAAA 0 A_Lower
	    DF02 A 1 A_Lower
		Goto Deselect+6
	//-------------------------------------------------------------------//	
	//----------------Fire, Easy State----------------------------------//	
      Fire:
	    TNT1 A 0 A_JumpIfInventory("PowerWeaponsSuper", 1, "FastFire")
	    NULL A 0 A_JumpIfNoAmmo("OutOfAmmo")
	    NULL A 0 A_PlaySound("RifleFire")
	    DF02 B 1 Bright A_FireCustomMissile("BlasterRedBolt", Random(-1, 1), 1, 5, 0, 0, Random(-1, 1))
	    DF02 B 1 Bright
		DF02 A 3 Bright
		Goto Ready
		
		//Special Code For Weapons Supercharge
		FastFire:
		NULL A 0 A_JumpIfNoAmmo("OutOfAmmo")
		TNT1 A 0 A_JumpIfInventory("UseAmmo", 1, "FastFireUseAmmo") 
	    NULL A 0 A_PlaySound("RifleFire")
	    DF02 B 1 Bright A_FireCustomMissile("BlasterRedBolt", Random(-1, 1), 0, 5, 0, 0, Random(-1, 1))
	    TNT1 A 0 A_GiveInventory("UseAmmo", 1)
		DF02 B 1 Bright
		DF02 A 2 Bright
		Goto Ready
		FastFireUseAmmo:
		NULL A 0 A_JumpIfNoAmmo("OutOfAmmo") 
	    NULL A 0 A_PlaySound("RifleFire")
	    DF02 B 1 Bright A_FireCustomMissile("BlasterRedBolt", Random(-1, 1), 1, 5, 0, 0, Random(-1, 1))
	    TNT1 A 0 A_TakeInventory("UseAmmo", 1)
		DF02 B 1 Bright
		DF02 A 2 Bright
		Goto Ready
		
		
	//-------------------------------------------------------------------//	
	//-------Out Of Ammo-----------------//	
	  OutOfAmmo:
	    DF02 A 2 A_WeaponReady
		NULL A 0 A_PlaySound("RifleOut")
	    Goto ready
	//------------------------------------//
	   Spawn:
	     DFW3 A -1
		 Stop
	//----------------------------------------//
		}
		
}

//-------Warning! Red Bolt using model!-----//
Actor BlasterRedBolt : StandartRedBolt { Damage (10) -FORCEPAIN }
//----------------------------------------------//