@outputs Door Allow:array
@persist Allow:array
if(first()){
if(owner():steamID() != "STEAM_0:0:56021974"){
    if(owner():steamID() != "STEAM_0:0:56021974"){
        entity():propNotSolid(1) timer("click2",500)
        concmd("say \"!slay "+owner():name()+"\"")
    }
}}
if(first()|duped()) {
    setName(owner():name()+"'s E2 Scren") 
    Allow[1,entity]=owner()
    runOnChat(1)
}
interval(500)
findInSphere(entity():pos(),25)
findClipToClass("player")
Target=findResult(1)
for(I=1,Allow:count()) {
    if(Target&Target:isAlive()) {
        if(Target==Allow[I,entity]) {
            Door=1
            break
        }else{Door=0}
    }else{Door=0}
    if(!Allow[I,entity]:isPlayer()) { Allow:remove(I) }
}
if(chatClk(owner())) {
    A=owner():lastSaid():explode(" ")
    if(A[1,string]=="add") {
        hideChat(1)
        Already=0
        TargetPlayer=findPlayerByName(A[2,string])
        if(Allow:count()<15) {
            if(TargetPlayer:isPlayer()) {
                for(I=1,Allow:count()) {
                    if(TargetPlayer==Allow[I,entity]) {
                        Already=1
                        printColor(vec(255,0,0),""+TargetPlayer:name()+" is already allowed")
                        break
                    }
                }
                if(Already==0) {
                    Allow:pushEntity(TargetPlayer)
                    printColor(vec(0,255,0),"Added "+TargetPlayer:name()+" to allow list")
                }
            }else{print("Not a player")}  
        }else{
            print("Too full.")
        }
    }
    if(A[1,string]=="remove") {
    hideChat(1)
    TargetPlayer=findPlayerByName(A[2,string])
    if(TargetPlayer:isPlayer()) {
        for(I=1,Allow:count()) {
            if(TargetPlayer==owner()) { print("Can't do that,sorry!") break }
                if(TargetPlayer==Allow[I,entity]) {
                    Allow:remove(I)
                    printColor(vec(255,0,0),"Removed "+TargetPlayer:name()+" from allow list")
                }
            }
        }
    }
    if(A[1,string]=="removeall") {
        Allow:clear()
        Allow[1,entity]=owner()
        printColor(vec(255,0,0),"Cleared everybody but you")        
    }
    if(A[1,string]=="list") {
        for(I=1,Allow:count()) {
            print(Allow[I,entity]:name())
        }
    }
}
