@name EasyForYou
@inputs Active Prop:entity
@outputs Vec:vector Tim X Grab
@persist Bum:array 
@trigger all  

runOnTick(1)


E = entity() 

if(first()){
X = 1
propSpawnEffect(0)
Prop = propSpawn("models/props_junk/PlasticCrate01a.mdl",E:pos()+vec(0,0,20),ang(0,0,0),1)
}
    
findByModel("models/props_junk/PopCan01a.mdl")
findIncludePlayerProps(owner()) 
Bum = findToArray()
Count = Bum:count()

if(Active){

if(X <= Count){
 
Tim+=0.1

if(Tim == 2){
Prop:setPos(Bum[X,entity]:pos() + vec(0,0,20)) 
}

if(Tim == 6){
Grab = 1    
}

if(Tim == 10){
Prop:setPos( E:pos() + vec(0,0,80) ) 
}

if(Tim == 15){
Grab = 0
}

if(Tim == 18){
Tim = 0
X+=1
}

}


}
