@name Privacy Chip
@inputs 
@outputs 
@persist P:array On
@model models/expression 2/cpu_microchip_nano.mdl
@trigger 
runOnTick(1)
runOnLast(1)
runOnChat(1)
O=owner()
entity():setAlpha(10)
entity():setColor(vec())
entity():setMaterial("Models/effects/vol_light001")
E=entity():pos()+vec(10,-10,50)
findInSphere(O:pos(),1000)
findIncludeClass("player")
findExcludeEntity(O)
P=findToArray()
if(first()){timer("delay",100)}
if(clk("delay")){On=1}
F=O:friends()
if(On){
    for(C=1,P:count()){
        Play=P[C,entity]
        Name=Play:name()
        FC=F:concat("<>")
        if(!FC:find(Name)){
            D=Play:pos():distance(O:pos())
            if(D<1000){Play:setPos(E)}
        }
    }
    if(last()){
        print("Privacy Chip has been removed")
    }
    if(O:lastSaid()=="PC off"){selfDestruct()}
}
