@name Kinetic Fury
@inputs 
@outputs FuryC Count
@persist Fury:array Sabot:string Chat:string Origin:vector
@persist Sentry Safe Safe1 Safe0 Sentry1 Sentry0
Time = 15
interval(Time)
ARadius = 1000
Pl="player"
Np="npc"
Origin =entity():pos()
findInSphere(Origin,ARadius)
findSortByDistance(Origin)
findExcludePlayer(entity():owner())

Fury = entity():getConstraints()
FuryC=Fury:count()

Chat = entity():owner():lastSaid()
C = Chat:find("Fury")
#K = (curtime() - entity():owner():lastSaidWhen()) < Time/1000
Sentry1=Chat:find("..")
Sentry0=Chat:find(",,")
Safe1=Chat:find("Safe")
Safe0=Chat:find("Unsafe")
if(Safe1){Safe=1}
if(Safe0){Safe=0}
if(Sentry1){Sentry=1}
if(Sentry0){Sentry=0}

Kill = Chat:find("ResetMe")
if (Kill) {reset()}

if (C) {
findAllowClass(Pl)
findDisallowClass(Np)
findIncludeClass(Pl)
findExcludeClass(Np)
findSortByDistance(Origin)
Quarry = findToArray()

}else{
findAllowClass(Np)
findDisallowClass(Pl)
findIncludeClass(Np)
findExcludeClass(Pl)
Quarry = findToArray()
}
if (clk()) {
timer("1",1)
timer("2",1)
timer("3",1)
timer("4",1)
timer("5",1)
timer("6",1)
}

#finds the current execution

if (clk("1")){Current = 1}
if (clk("2")){Current = 2}
if (clk("3")){Current = 3}
if (clk("4")){Current = 4}
if (clk("5")){Current = 5}
if (clk("6")){Current = 6}

Q=Quarry:entity(Current)
Count=Quarry:count()
Home=entity()

if (Count>=Current){XYZ = Q:pos()}else{XYZ=Home:pos()}
E=Fury:entity(Current)
E:applyForce((20*((XYZ-E:pos())+vec(0,0,Q:height()/2))-E:vel())*E:mass()+Q:vel()*10)

if (E:mass()<50) {E:setMass(400)}
if (Safe){entity():setAlpha(255) Fury:entity(Current):setAlpha(255)}
if (Sentry|!Safe){entity():setAlpha(0) Fury:entity(Current):setAlpha(0)}
if (!Safe&!Sentry){timer("destruct",1000) }
if (clk("destruct")) {selfDestructAll()}


