@name Overhead
@inputs 
@outputs Target:entity F  E:entity P:vector D:vector O:entity  C:entity
@persist 
@trigger 
E=entity():isWeldedTo()
P=Target:pos()
X=P:x()      
Y=P:y()
Z=P:z()+200
D=vec(X,Y,Z)
if(first()){
E:applyForce((owner():pos()-E:pos()-E:vel()+O:vel())*E:mass())
runOnTick(1)
runOnChat(1)
}


if (chatClk(owner())) {
Command = owner():lastSaid():explode(" "):string(1) 
Argument = owner():lastSaid():explode(" "):string(2) 
  
   if (Command == "!player")
    {    
    if (Argument)
   {
    Target = findPlayerByName(Argument)}
    E:setColor(255,0,0)
    Target:setMaterial("models/screenspace")
}
if (Command == "!owner")
      {
    Target = owner()
    E:setColor(0,255,0)
}
}
    if (tickClk())
    {
E:setMaterial("models/debug/de bugwhite")
E:setMaterial("models/shiny")

E:applyForce((10*(D-E:pos())-E:vel()+O:vel())*E:mass())
}




