Actor TrueLegTimeFreezeSphere : CustomInventory 26351
{
 Inventory.PickupMessage "\c[l5]True Legendary Time Freeze Sphere. Consider yourself a timelord!"
 Tag "True Legendary Time Freeze Sphere"
 Inventory.PickupSound "legtime/pickup"
 Inventory.UseSound "truelegtime/use"
 Inventory.Icon "TLTFZ0"
 +INVBAR
 +INVENTORY.BIGPOWERUP
 +NOTIMEFREEZE
 +DONTGIB
 States
 {	
  Spawn:
	TLTF A 0 NoDelay ACS_NamedExecuteAlways("SpawnEffectsOnItem",0,6,19)
  SpawnLoop:
	TLTF ABCDE 10 Bright
	Loop
  Use:
	TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("SCR_IS_TIMEFREEZE_ALLOWED", 0, 0) == 1, "TooSoon")
	TNT1 A 0 A_PlaySound("truelegtime/use")
	TNT1 A 0 A_GiveInventory("TrueLegTimeFreezer")
	TNT1 A 0 A_SpawnItemEx("TrueTimeFreezeSoundEffect")
	TNT1 A 0 ACS_NamedExecute("SCR_TIMEFREEZE", 0, 11)
	Stop  	
  TooSoon:
	TNT1 A 0 ACS_NamedExecute("SCR_TIMEFREEZE_TOOSOON", 0, 0)
	Fail
 }
}

Actor TrueLegTimeFreezer : PowerupGiver
{
 Inventory.MaxAmount 0
 +INVENTORY.AUTOACTIVATE
 +INVENTORY.ALWAYSPICKUP
 +NOTIMEFREEZE
 Powerup.Duration -24
 Powerup.Color BlueMap
 Powerup.Type "PowerTimeFreezer"
}

Actor TrueTimeFreezeSoundEffect
{
 +NOTIMEFREEZE
 States
 { 	
  Spawn:
	TNT1 A 0 NoDelay A_PlaySound("truelegtime/effect0",CHAN_AUTO|CHAN_NOPAUSE,1.0,FALSE,ATTN_NONE)
	TNT1 A 45 A_PlaySound("timefreeze/effect1",CHAN_AUTO|CHAN_NOPAUSE,1.0,FALSE,ATTN_NONE)  
	TNT1 A 675 A_PlaySound("timefreeze/effect2",CHAN_BODY|CHAN_NOPAUSE,1.0,FALSE,ATTN_NONE)
	TNT1 A 1 A_StopSound(CHAN_BODY)  
	TNT1 A 1 A_PlaySound("timefreeze/effect3",CHAN_AUTO|CHAN_NOPAUSE,1.0,FALSE,ATTN_NONE)  
	Stop
 }
}