Good job! Heres some better boots though..
PHP Code:
//#CLIENTSIDE
function onCreated()
{
this.speed = 1;
setTimer(.05);
}
function onKeyPressed( key, name)
{
if ( name == "z" ) {
if ( this.on == 0 ) player.chat = "-- Staff Boots On --";
else player.chat = "-- Staff Boots Off --";
this.on = !this.on;
}
}
function onTimeOut()
{
if ( this.on == 1 ) {
for ( this.i = 0; this.i <= 3; this.i ++) {
if ( keydown(this.i) ) {
playerx += vecx(this.i)*this.speed;
playery += vecy(this.i)*this.speed;
}
}
}
setTimer(.05);
}
function onPlayerChats()
{
if ( player.chat.tokenize()[0] == "/speed" ) {
if ( player.chat.tokenize()[1] >= 1 && player.chat.tokenize()[1] <= 5 ) this.speed = player.chat.tokenize()[1];
else player.chat = "Speed must be higher then 1 and lower then 5!";
}
}
Activate them by pressing "z", and change speed by saying i.e. /speed 3.