@name Telekinesis
@persist Holding Use Ent:entity
runOnTick(1)
HoldDistance = 100
ThrowStrength = 2500000
Use = owner():keyUse()
if(Use&$Use){
    if(Holding){
        Holding = 0
        Ent:setMass(1)
    }else{
        Ent = owner():aimEntity()
        if((Ent:type()=="prop_physics"&!Ent:isFrozen()&Ent:owner()==owner()))
        {Holding = 1,Ent:setMass(50000)}
    }
}
if(Holding){
    Point = owner():shootPos()+owner():eye()*(HoldDistance+Ent:radius())
    Ent:applyForce(((Point-Ent:pos())*10-Ent:vel())*Ent:mass())
    if(!Ent){Holding = 0}
    if(owner():keyAttack1()){
        Holding = 0
        Ent:applyForce(owner():eye()*ThrowStrength*Ent:mass())
    }
}

