@name Gravity Well
@inputs 
@outputs 
@persist C
@trigger 
if(ops()>1500){exit()}
runOnTick(1)
findInSphere(entity():pos(),100000)
findExcludeClass("player")
findExcludeClass("npc")
#findIncludeModel("scan")
#findIncludeModel("strider")
Obj=findToArray()

while(C<=Obj:count()&perf()){
    XYZ=entity():pos()+vec(0,0,100)
    
    E=Obj[C,entity]
    Force=10*(E:mass()/4)
    E:applyForce(Force*(XYZ-E:pos())-(E:vel()/2)*E:mass())
    C++
}
if(C>Obj:count()){C=1}
runOnChat(1)
if(chatClk()&owner():lastSaid()=="No well"){selfDestruct()}
