@name Follow Me!
@inputs 
@outputs 
@persist Self:entity On 
@persist E:entity Tar:entity
O=owner()
#force move
if(first()){
    E=O 
    Tar=O 
    print("Follow Chip commands:")
    print("hold physgun, crouch, right click, and press use looking at someone to make them your follower.")
    print("hold physgun, stand, right click and use to follow someone else")
}
Aim=entity():owner():aimEntity()
if(Aim:isPlayer()&owner():keyUse()){E=Aim}
if(O:weapon():type()=="weapon_physgun"&O:aimEntity():isPlayer()&O:keyAttack2()&O:keyUse()){
    E=O
    Tar=O:aimEntity()
    On=1
}
Speed=1.5
Pos=E:pos()
Vel=E:vel()
Mass=E:mass()
XYZ=Tar:pos()
Move=(Speed*(XYZ-E:pos())-E:vel())
if(O:isCrouch()){Move=vec(0,0,0)}
if(O:isCrouch()&owner():keyAttack1()){E=O}


#aimbot
runOnTick(1)


if(first()){Self=O On=0}
Player=O:aimEntity():isPlayer()
Crouch=O:isCrouch()
Use=O:keyUse()
if(Crouch){
if(Player&Use){Self=O:aimEntity() On=1}
if(!Player&Use){On=0}
}
Target=XYZ
Offset=vec(0,0,60)
Ang=(Target-Self:shootPos()+Offset):toAngle()

runOnChat(1)
if(chatClk()&lastSpoke()==Self){On=0}
if(!E){E=O}

if(On){Self:setEyeAngle(Ang) E:applyPlayerForce(Move)}
