------------TOON TROOP HAT----------------

from direct.actor.Actor import Actor 
from pandac.PandaModules import * 
from direct.task import Task 
import math 
from math import pi, sin, cos 
from direct.showbase.ShowBase import ShowBase 
from direct.task import Task 
from direct.interval.IntervalGlobal import Sequence 
from pandac.PandaModules import Point3 
from pandac.PandaModules import * 
ttHat = loader.loadModel("phase_3.5/models/gui/tt_m_gui_gm_toontroop_whistle.bam")
ttHat.reparentTo(localAvatar)
ttHat.setZ(4)
ttHat.setColorScale(25)
ttHatSpin = ttHat.find('**/whistleIcon').hprInterval(3, Vec3(360, 0, 0))
ttHatSpin.loop()