@name AFAAFTurret
@outputs Fire
@inputs Tar:entity Firing
@persist E:entity V:vector Angle:angle Tar:entity

    runOnTick(1)
        findIncludePlayerProps(owner())
        findByClass("gmod_wire_turret")
        E = findResult(1)
    E:setMass(4000)
        P=E:elevation(Tar:pos()+(Tar:height()/1.8))
        Y=E:bearing(Tar:pos())
        R=E:angles():roll()
    if(Tar:isAlive()){Fire = 1} else {Fire = 0}
    Angle = -ang(P,Y,R)*9999
    V = (entity():pos()+vec(0,0,50) - E:pos())*5000
        E:applyAngForce(Angle + $Angle*5)
        E:applyForce(V + $V*5)
