I just upgraded the flight script adding more controls and effects such as the bouncing/levitating effect.
PHP Code:
/* Hi, this script was made by Noof. on the TestBed server,
Press the 'O' Button to turn on, use the '+' and '-' to change your altitude.
This script is kind of useless but other than that, enjoy!
*/
//#CLIENTSIDE
function onKeyPressed(code, key) {
if (key == "o") {
if (this.fly == "on") {
player.z -= this.height / 3;
sleep(.2);
player.z -= .3;
sleep(.1);
player.z -= .3;
sleep(.1);
player.z = 0;
this.height = 0;
this.fly = "off";
player.chat = "Flight -Off-";
setTimer(0);
} else {
this.fly = "on";
player.chat = "Flight -On-";
setTimer(0.05);
}
}
if (this.fly == "on") {
if (code == 187) {
if (this.height < 5) {
this.height += .5;
}
player.chat = "Height: " @ this.height;
if (this.height == 5) {
player.chat = "Maximum height reached!";
}
onCreated();
}
if (code == 189) {
player.chat = "Height: " @ this.height;
if (this.height > .1) {
this.height -= .5;
}
if (this.height == 0) {
player.chat = "Can't go lower than this!";
}
onCreated();
}
}
}
function onCreated() {
this.height = 0; //JOHN Happy!?!? lmao
if (this.fly == "on" && this.height < 5 && this.height > 0) {
player.z = this.height;
setTimeout(0.05);
}
}
function onTimeout() {
if (this.fly == "on") {
player.z += .1;
sleep(.1);
player.z += .2;
sleep(.1);
player.z += .3;
sleep(.15);
player.z -= .1;
sleep(.15);
player.z -= .2;
sleep(.1);
player.z -= .3;
sleep(.1);
setTimer(0.05);
}
onCreated();
}
And John, I always looked at
As just creating the variable and setting it later, guess it would not be the same for graal thanks I changed it in the script specifically for you