basically do this
NPC Code:
if(created && !isweapon)
toweapons run faster;
if(playerenters&&isweapon)
timeout=0.05
if(timeout){
if(!onwall(playerx,playery)&&!onwall(playerx+3,pla yery)&&!onwall(playerx,playery+3)&&!onwall(playerx +3,playery+3)){
if(keydown(0)){playery-=0.5}
if(keydown(1)){playerx-=0.5}
if(keydown(2)){playery+=0.5}
if(keydown(3)){playerx+=0.5}
}
timeout=0.05;
}
humm well I just made that... dunno if it works... (you might also want to add something were like it checks if they fired the weapon or not...)
(there also might be small glitches in the onwall but it is close enough)