@name Croco Soda machine
@inputs 
@outputs 
@persist Chat:array [A B C E]:entity Y Limit Ents:array Ent:entity
@trigger 
@model models/props_interiors/VendingMachineSoda01a.mdl
if (first()) {Y = 0 Limit = 1}
interval(100)
timer("check",300)
Distance = 70
Result = ""
Times = 100
Damage = 20
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()
    Hp = " 10"
    Name=P:name()
    if(Use==1){
        if (Y <= Limit) {
propSpawn("models/props_junk/PopCan01a.mdl",entity():pos()+vec(5,0,-5),0)
Ents[Y,entity] = Ent
Y++
}}}}}}}

if(Y == 1){
Ents:propDelete()
Y = 0
}
