NPC Code:
if (created){
this.pos = 15;
this.speed = 1;
}
if (weaponfired && this.bootson == 1){
hideimg nums;
this.bootson = 0;
for(this.speedsel=0;this.speedsel<=5;this.speedsel ++){
hideimg 200+(this.speedsel);
}
hideimg 230;
hideimg 231;
this.pos =15;
}
else if (weaponfired){
this.bootson = 1;
for(this.speedsel=1;this.speedsel<=5;this.speedsel ++){
this.pos=this.pos+20;
showtext 200+(this.speedsel),this.pos,115,,,#v(this.speedse l);
changeimgvis 200+(this.speedsel),5;
}
showimg 231,admingui.gif,10,115;
changeimgvis 231,4;
timeout = .05;
}
if (timeout && this.bootson == 1) {
for (i=0;i<4;i++) {
if (keydown(i)) {
playerx += (vecx(i)/2)*this.speed;
playery += (vecy(i)/2)*this.speed;
}
}
showtext 230,30,135,,,X: #v(mousescreenx) Y: #v(mousescreeny);
changeimgvis 230,5;
if (mousescreenx in |35,45| && mousescreeny in |120,135|){
if(leftmousebutton){
this.speed = 1;
sleep .5;
}
}
if (mousescreenx in |55,65| && mousescreeny in |120,135|){
if(leftmousebutton){
this.speed = 2;
sleep .5;
}
}
if (mousescreenx in |75,85| && mousescreeny in |120,135|){
if(leftmousebutton){
this.speed = 3;
sleep .5;
}
}
if (mousescreenx in |95,105| && mousescreeny in |120,135|){
if(leftmousebutton){
this.speed = 4;
sleep .5;
}
}
if (mousescreenx in |115,125| && mousescreeny in |120,135|){
if(leftmousebutton){
this.speed = 5;
sleep .5;
}
}
timeout = .05;
}
there's the problematic code, all clientside