so i found this sciript wich was staff boots script wich was made by gambit how do i add to me level.
PHP Code:
//Custom staff boots system
//By: Gambet
//Controls:
// + and = key (left of backspace on American keyboard) - plus speed
// - and _ key (left of + and = key on American keyboard) - minus speed
// z key = toggle on/off
// Max Speed: 10
//#CLIENTSIDE
function onKeyPressed(code,key)
{
if (key == "z")
{
if (this.staff_boots == "on")
{
this.staff_boots = this.speed = "";
player.chat = "Staff Boots -Off-";
setTimer(0);
} else
{
this.staff_boots = "on";
player.chat = "Staff Boots -On-";
setTimer(0.05);
}
}
if (code == 187)
{
if (this.speed+1 <= 10)
{
this.speed+=1;
player.chat = "Speed: " @ this.speed;
}
} else if (code == 189)
{
if (this.speed-1 >= 1)
{
this.speed-=1;
player.chat = "Speed: " @ this.speed;
}
}
}
function onTimeOut()
{
if (this.staff_boots == "on")
{
for (a=0; a<4; a++)
{
if (keydown(a))
{
switch(a)
{
case "0":
player.y-=this.speed;
break;
case "1":
player.x-=this.speed;
break;
case "2":
player.y+=this.speed;
break;
case "3":
player.x+=this.speed;
break;
}
}
}
}
setTimer(0.05);
}
how do i make it usable in my level pls help me