Actor LegendaryInvisibilitySphere : CustomInventory
{
  Inventory.PickupMessage "Legendary Invisibility Sphere! They won't see what's coming."
  Inventory.PickupSound "legendarycrystal/take"
  Inventory.UseSound "Powerup/Terror"
  Inventory.Icon "LINVE0"
  Inventory.MaxAmount 1
  Renderstyle Add
  +INVBAR
  +COUNTITEM
  +INVENTORY.BIGPOWERUP
  +NOTIMEFREEZE
  +FLOAT
  +FLOATBOB
  States
  {
  Spawn:
	TNT1 AA 0 Bright A_CustomMissile("YellowSparkleSpawner",0,0,random(0,-360),2,random(0,360))
	LINV ABCD 5 Bright A_CustomMissile("LegendarySphereFlameSpawner",-20,0,random(0,-360),2,random(0,360))
	Loop
  Use:
    TNT1 A 0
	TNT1 A 0 A_GiveInventory("PowerLegendarySpooker",1)	
	TNT1 A 0 A_GiveInventory("PowerLegendaryInvisibility",1)	
	TNT1 A 1 ACS_NamedExecuteAlways("LegendaryInvisibility",0)
    Stop  
  }
}

Actor LegendaryInvisibilitySphereQuiet : LegendaryInvisibilitySphere
{
  -INVBAR
  -COUNTITEM
  +INVENTORY.ALWAYSPICKUP
  +INVENTORY.QUIET
  States
  {
  Pickup:
    TNT1 A 0
	TNT1 A 0 A_GiveInventory("PowerLegendarySpooker",1)	
	TNT1 A 0 A_GiveInventory("PowerLegendaryInvisibility",1)	
	TNT1 A 1 ACS_NamedExecuteAlways("LegendaryInvisibility",0)
    Stop  
	}
}

Actor PowerLegendarySpooker : PowerFrightener
{
  Powerup.Duration -30
}

Actor PowerLegendaryInvisibility : PowerInvisibility
{
  +GHOST
  +CANTSEEK
  Powerup.Strength 100
  Powerup.Duration -30
}