@name Passive Defense
@inputs 
@outputs Target:entity XYZ:vector
@persist [K D]:array Target:entity XYZ:vector
@model models/expression 2/cpu_processor_nano.mdl
@trigger 
#by Captain Maim (STEAM_0:1:8017844)
#punishes those who get kills off your deaths
E=entity()
runOnTick(1)
O=owner()
P=players()


if(changed(O:deaths())){
    for(C=1,P:count()){
        if(K[C,number]!=P[C,entity]:frags()){
            Target=P[C,entity]
            #print(P[C,entity]:name()+" killed you!")
            
        }
    }
}
for(C=1,P:count()){
    K:pushNumber(P[C,entity]:frags())
    D:pushNumber(P[C,entity]:deaths())
}

if(Target){
    E:setMass(500)
    TargetA=Target:isAlive()
    if(TargetA){
        XYZ=Target:pos()+vec(0,0,Target:height()/2)
    }else{Target=noentity()}
}else{XYZ=O:pos()+vec(0,0,100) E:setMass(1)}
if(first()){
     Target=noentity()
    E:setAlpha(10)
    
}       
        Speed=100*(E:mass()/4)
        E:applyForce(Speed*(XYZ-E:pos())-E:vel()*E:mass())
