@name E2 door
@persist A:array E:entity L
if(first())
{
    runOnTick(1)
    A = array("STEAM_0:0:32759932")
    E = entity():isConstrainedTo()
    entity():setColor(0,0,0,0)
    entity():propNotSolid(1)
}

if(findCanQuery())
{
    findByClass("player")
    findSortByDistance(E:pos())
    if(find():pos():distance(E:pos())<E:radius()+50)
    {
        if(!L)
        {
            if(changed(find():keyUse())&find():keyUse()&find():aimEntity()==E)
            {
                foreach(I,S:string=A)
                {
                    if(find():steamID()==S)
                    {
                        Alw = 1
                        break
                    }else
                    {
                        Alw = 0
                    }
                }
                if(Alw)
                {
                    L = 1
                    timer("l",1000)
                }
            }
        }
        if(changed(L))
        {
            if(L)
            {
                E:propNotSolid(1)
            }else
            {
                E:propNotSolid(0)
            }
        }
    }
}

if(clk("l"))
{
    stoptimer("l")
    L = 0
}

if(duped()||dupefinished())
{
    reset()
}
