@name 
@inputs 
@outputs 
@persist Array:array M:string H
@trigger 
@model models/effects/bday_gib01.mdl

timer("check",160)
Distance = 100
Result = ""
Times = 50
Damage = 20
interval(2000)
if (clk("check")) {
    findInSphere(entity():pos(), Distance)
    Array = findToArray()
    for(I=1,Array:count()) {
        if(Array[I,entity]:isPlayer()) {
            if(Array[I,entity]:isAlive()) {
                if (Result != "whip") {       
    P = findClosest(entity():pos())
    Use = P:keyUse()
                        if(Use==1){   
                                    
entity():soundPlay(100,100,"misc/happy_birthday.wav")                            
timer("delete",2500)
timer("spawn",150)
H = randint(7)
}}}}}}
if(clk("delete")){selfDestructAll()}
if(H==1){M = "models/player/gibs/gibs_balloon.mdl"}
if(H==2){M = "models/player/gibs/gibs_boot.mdl"}
if(H==3){M = "models/player/gibs/gibs_burger.mdl"}
if(H==4){M = "models/player/gibs/gibs_can.mdl"}
if(H==5){M = "models/player/gibs/gibs_clock.mdl"}
if(H==6){M = "models/player/gibs/gibs_duck.mdl"}


if(clk("spawn")){Ent = propSpawn(M,200)
Ent:setPos(entity():pos())
Ent:propFreeze(0)}
