NPC Code:
if (playertouchsme) toweapons Admin Boots;
if (weaponfired) this.active=1-this.active;
if ((created||timeout)&&isweapon) {
if (this.speed==0) this.speed=1;
for (i=0;i<4;i++) if (keydown(i)) {
playerx+=vecx(i)*this.speed;
playery+=vecy(i)*this.speed;
}
timeout=0.05;
}
if (playerchats&&startswith(setspeed,#c)) this.speed=strtofloat(#T(#e(8,-1,#c)));
Simple, short and it does exactly the same.