@name gman3
@inputs 
@outputs 
@persist T

if (first() | duped()) {
    runOnChat(1)
    T = 0
}

LastSaid = owner():lastSaid():lower()
O = owner()

if (LastSaid == "gman3") {T = 1}
elseif (LastSaid == "stop3") {T = 0}

if (T) {
    if ($T) {
         soundStop(0)
        O:soundPlay(0,0,"vo/gman_misc/gman_04.wav")
        O:setMaterial("models/shiny")}
        timer("Color",10)
        if (clk("Color")) {
            O:setColor(random(255),random(255),random(255))
}
    }
else {
    soundPurge()
    O:setColor(255,255,255)
    O:setMaterial("")
}
