@name AFK Prison
@inputs 
@outputs Distance
@persist StartTime Players:array
@trigger all
interval(50)
if (first()) {StartTime = curtime()}
Origin = entity():pos()
findInSphere(Origin,150000)
findSortByDistance(Origin)
findIncludeClass("player")
Players = findToArray()

if (Players:count()) {
Player1 = Players:entity(1)
P1=Player1:pos()
#Distance = Origin:distance(Player1:pos())
Distance = abs((P1:x()^2+P1:y()^2+P1:z()^2)^0.5-(Origin:x()^2+Origin:y()^2+Origin:z()^2)^0.5)
if (Distance>150) {Player1:setPos(Origin+vec(0,0,10))}
ChatBreak = Player1:lastSaidWhen()-StartTime
if (ChatBreak>0) {selfDestruct()}
}
