@name hover expression
@persist Vector:vector Activate X Y Z I J K

interval(10)

if(lastSaid()=="/on" & lastSpoke()==owner())
{
Activate=1
}
if(lastSaid()=="/off" & lastSpoke()==owner())
{
Activate=0
}


#if(Activate)
#{
entity():setMass(100)

Vector=owner():pos()-(entity():pos()-vec(0,0,160))
applyForce($Vector*10+Vector)

if(owner():keyUse())
{
Vector = owner():aimPos() - entity():pos()
applyForce($Vector+Vector*100000)
}

if(owner():keyAttack2())
{


if(X==200 & Y==0)
{
I=0
J=0
}
elseif(X==0 & Y==-200)
{
I=0
J=1
}
elseif(X==-200 & Y==0)
{
I=1
J=1
}
elseif(X==0 & Y==200)
{
I=1
J=0
}

if(I)
{
X=X+25
}
else
{
X=X-25
}

if(J)
{
Y=Y+25
}
else
{
Y=Y-25
}

if(Z==50)
{
K=0
}
elseif(Z==-50)
{
K=1
}

if(K)
{
Z=Z+10
}
else
{
Z=Z-10
}


Vector=owner():pos()- (entity():pos()-vec(X,Y,Z))
applyForce($Vector*30+Vector)

}
else
{
X=200
Y=0


}

#}
