@name FailCake Bubbles MAD
@inputs Start
@outputs E:entity Start Speed [X Y]:array MAXB Down Speed2
@persist T 
@trigger all
runOnTick(1)

if(first()){
E = entity()

### Setting

MAXB = 78
Speed = 23
Speed2 = 33
Start = 1

### Setting

for(I=0,MAXB){
holoCreate(I)
holoModel(I,"hqsphere")
holoScaleUnits(I,vec(randint(3,5),randint(3,5),randint(3,5)))
holoPos(I,E:toWorld(vec(0,0,5)))
holoAlpha(I,255)
holoMaterial(I,"models/props_combine/health_charger_glass")
holoEntity(I):setTrails(20,20,100,"trails/lol",vec(randint(1,255),randint(1,255),randint(1,255)),255)
}

}

if(Start){ 
 
timer("Down",5000)
if(clk("Down")){
Down = 1    
}
   
timer("random",1500)
if(clk("random")){
    
for(P=0,MAXB){
Y[P,number] = tan(random(-Speed,Speed))*39
X[P,number]= tan(random(-Speed2,Speed2))*39
}
     
}
    
for(P2=0,MAXB){
    
if(Down){
holoPos(P2,holoEntity(P2):pos() + vec(X[P2,number],Y[P2,number],-2)) 
}else{
holoPos(P2,holoEntity(P2):pos() + vec(0,0,5)) 
}

} 
 
}
