@name RPTHING
@inputs 
@outputs Use
@persist 
@trigger 
# Made by Ammut
interval(1)

if(first()){
    E = entity()
    Scale = 99999
    
     
    Use = 1
    H = E:isWeldedTo()
   # E:propNotSolid(0)
   # H:propNotSolid(0)
   # E:setPos(owner():pos() + vec(0,0,100))
   # H:setPos(owner():pos() + vec(0,0,100))
}


if(owner():keyReload()){
findExcludeClass("*")
findIncludeModel("models/props_c17/consolebox01a.mdl")
findInSphere(E:pos(),Scale)
if(find()){
G = findClosest(entity():pos())
if(G:model() == "models/props_c17/consolebox01a.mdl"){
 #   E:propNotSolid(1)
 #   H:propNotSolid(1)
#E:setPos(G:pos() + vec(0,0,10))
#H:setPos(G:pos() + vec(0,0,10))
Use = 1
timer("reset",1000)
}
}
}
if(owner():keyUse()){
    reset()
}

if(clk("reset")){
    Use = 0
   # E:setPos(owner():pos() + vec(0,0,100))
}
