actor HatMenuFreeze: PowerSpeed
{
    Powerup.Duration 0x7FFFFFFF
    Speed 0
}

actor IAmAHat: Inventory
{
    Inventory.MaxAmount 1
    +UNDROPPABLE
}

actor Hat
{
    Radius 0
    Height 0

    RenderStyle Translucent
    Gravity 0.75

    +NOINTERACTION
    +CLIENTSIDEONLY
    +NOTELEPORT
    +NOTIMEFREEZE

    States
    {
      Spawn:
        TNT1 A 0
        TNT1 A 0 A_GiveInventory("IAmAHat")
        TNT1 A 1 A_Jump(255, "Hat")
        wait

      HatDeath:
        TNT1 A 0
        TNT1 A 1 A_Jump(255, "Spawn")
        wait
    }
}

actor Hat_FallOffHead: CustomInventory
{
    Inventory.MaxAmount 0
    +AUTOACTIVATE

    States
    {
      Pickup:
        TNT1 A 0 A_ChangeFlag("NOINTERACTION", 0)
        TNT1 A 0 ACS_ExecuteAlways(181, 0, 350, 0, 175)
        stop
    }
}

actor crown6066 : Hat
{
    scale 0.18
    States
    {
      Spawn:
        CROW A 1 
        loop
    }
}

actor TopHat : hat
{
    scale 0.05
    States
    {
      Spawn:
        THAT A 1 
        loop
    }
}

actor NIGPLZ : hat
{
    scale 0.06  
    States
    {
      Spawn:
        NPLZ A 1 
        loop
    }
}

actor Sombrero : hat
{
    scale 0.085
    States
    {
      Spawn:
        SOMB A 1 
        loop
    }
}

actor Fez : hat
{
    scale 0.125
    States
    {
      Spawn:
        DFEZ A 1 
        loop
    }
}

actor turban : hat
{
    scale 0.07
    States
    {
      Spawn:
        PICC A 1 
        loop
    }
}

actor runescape : hat
{
    scale 0.75
    States
    {
      Spawn:
        RSOT A 1 
        loop
    }
}

actor bunnyears : hat
{
    scale 0.07
    States
    {
      Spawn:
        BUNN A 1 
        loop
    }
}

actor demonhorns : hat
{
    scale 0.07
    States
    {
      Spawn:
        DHOR A 1 bright 
        loop
    }
}

actor halo : hat
{
    scale 0.05
    States
    {
      Spawn:
        HALO A 1 bright
        loop
    }
}

actor MariosHat : hat
{
    scale 0.05
    States
    {
      Spawn:
        MARI A 1 
        loop
    }
}

actor ArbysHat : hat
{
    scale 0.05
    States
    {
      Spawn:
        ARBY A 1 bright
        loop
    }
}

actor PinkBow : hat
{
    scale 0.045
    States
    {
      Spawn:
        ABOW A 1 
        loop
    }
}

actor PARTYHAT : hat
{
    scale 0.06
    States
    {
      Spawn:
        PART A 1 
        loop
    }
}

actor CHEFSHAT : hat
{
    scale 0.065
    States
    {
      Spawn:
        CHEF A 1 
        loop
    }
}

actor SAILORSHAT : hat
{
    scale 0.04
    States
    {
      Spawn:
        SAIL A 1 
        loop
    }
}

actor METALPOT : hat
{
    radius 1
    scale 0.0485
    States
    {
      Spawn:
        APOT A 1 
        loop
    }
}

actor VIKINGHAT : hat
{
    radius 1
    scale 0.05
    States
    {
      Spawn:
        VIKE A 1 
        loop
    }
}

actor COWBOYHAT : hat
{
    radius 1
    scale 0.04
    States
    {
      Spawn:
        COWB A 1 
        loop
    }
}

actor GRADHAT : hat
{
    radius 1
    scale 0.055
    States
    {
      Spawn:
        GRAD A 1 
        loop
    }
}

actor PIMPHAT : hat
{
    radius 1
    scale 0.055
    States
    {
      Spawn:
        PIMP A 1 
        loop
    }
}

actor Fedorahat : hat
{
    scale 0.082
    States
    {
      Spawn:
        FERH A 1 
        loop
    }
}

actor WatermelonHat: Hat
{
    Scale 0.2

    States
    {
      Spawn:
        MELO N -1
        loop
    }
}

actor BananaHat: Hat
{
    Scale 0.15

    States
    {
      Spawn:
        BNAN A -1
        loop
    }
}

actor StrawberryHat: Hat
{
    Scale 0.17

    States
    {
      Spawn:
        STBR Y -1
        loop
    }
}

actor SteakHat: Hat
{
    Scale 0.17

    States
    {
      Spawn:
        STEA K -1
        loop
    }
}

actor RocketHat: Hat
{
    States
    {
      Spawn:
        HATR A 1
        loop
    }
}

actor PirateHat: Hat
{
	scale 0.2
    States
    {
      Spawn:
        PRTH A -1
        loop
    }
}

actor ProtectFromMelee: Hat
{
	scale 0.45
	alpha 0.8
    States
    {
      Spawn:
        MLEL A -1 bright
        loop
    }
}

actor THEAFRO: Hat
{
	scale 1.2
    States
    {
      Spawn:
        TFRO A -1
        loop
    }
}


actor FELEMOIDBUMB: Hat
{
	SCALE 0.45
    States
    {
      Spawn:
        CFLM A 10
		CFLM B 10 BRIGHT
        loop
    }
}

actor RocketJumperGold: Hat
{
	+ROCKETTRAIL
    States
    {
      Spawn:
        GLDR A 1 bright
        loop
    }
}

actor CybRunnerHelmet: Hat
{
	scale 0.8
    States
    {
      Spawn:
        CYBZ A -1
        loop
    }
}

actor CloudHat: Hat
{
	SCALE 0.5
	RenderStyle translucent
	alpha 0.2
    States
    {
      Spawn:
        DECL ABC 4
		DECL D 4
		DECL BC 4
        loop
    }
}