@name Turret For PC Gaming Club
@inputs Location:entity 
@outputs Gryo:angle Tar:entity P Y R
@persist V:vector Tar:entity 
@trigger 
@model models/props_phx/construct/metal_plate1.mdl

runOnTick(1)
runOnChat(1)
Players = players()

if(chatClk(owner())){
    Chat = owner():lastSaid():explode(" ")
    if(Chat:string(1)=="/t"){
        Tar = findPlayerByName(owner():lastSaid():sub(4))
        }
    }




Strength = 5000

Plate = entity()

Me = owner()

V = (Location:pos() - Plate:pos()) + vec(0,0,20)

Plate:applyForce((V + $V*5)*600) 

P = Plate:elevation(Tar:boxCenter())
Y = Plate:bearing(Tar:boxCenter())
R = Plate:angles():roll()


Gryo = -ang(P,Y,R)*700

Plate:applyAngForce(Gryo + $Gryo*5)


