@name Insta Firework by Jim Dangle
@inputs 
@outputs 
@persist Temps:array Rocket:entity
@trigger 

if(first() | duped()){
    Rocket = entity():isWeldedTo()
    Rocket:applyForce(vec(0,0,100)*1700)
    Rocket:setTrails(2,1,0.2,"models/debug/debugwhite", vec(233,233,233), 255, 1, 1)
    soundPlay(0,0,"fireworks/firework_launch_1.wav")
    }

timer("Boom", 850)
if(clk("Boom")){
    Players = players()
    for(I=1, Players:count()){
        Players[I, entity]:soundPlay(0,0,"fireworks/firework_explosion_1.wav")   
        }
    for(I=1, 6){
        Temp = propSpawn("models/props_junk/PopCan01a.mdl",0)
        Temp:applyForce(vec(-randint(100000000)^I, -randint(1000000)^I, -randint(100000)^I))
        Temp:setTrails(1,1,2, "models/debug/debugwhite", vec(233,233,233), 255, 1, 1)
        Temps:pushEntity(Temp)
        
        }
   
       }
    
    



