MonitorButtons()
{
self endon("death");
self endon("disconnect");
for(;
{
if(self UseButtonPressed())
{
self notify("Pressed_Square");
wait .3;
}
if(self AttackButtonPressed())
{
self notify("Pressed_R1");
wait .3;
}
if(self AdsButtonPressed())
{
self notify("Pressed_L1");
wait .3;
}
if(self SecondaryOffhandButtonPressed())
{
self notify("Pressed_L2");
wait .3;
}
if(self FragButtonPressed())
{
self notify("Pressed_R2");
wait .3;
}
if(self MeleeButtonPressed())
{
self notify("Pressed_Melee");
wait .3;
}
wait .05;
}
}
menuEntering()
{
self endon("death");
self endon("disconnect");
self.menuOpen = 0;
self.aim = false;
self.god = false;
self.jump = false;
self.speed = false;
self thread MonitorButtons();
//self notifyOnPlayerCommand("dpad_down","+actionslot 2");
//self notifyOnPlayerCommand("left_stick", "+breath_sprint");
for(;
{
self waittill("Pressed_Square");
if(self.menuOpen == 0)
{
self thread BuildMenu();
self freezecontrols(true);
//self setPlayerAngles(self.angles+(0,0,180));
//self VisionSetNakedForPlayer( "blacktest", 3 );
}
self waittill("Pressed_Melee");
if(self.menuOpen == 1)
{
self.menuOpen = 0;
self.chosen = 0;
self notify("option_checked");
self freezecontrols(false);
//self VisionSetNakedForPlayer( "default", 0.05 );
//self setPlayerAngles(self.angles+(0,0,0));
}
}
}
BuildMenu()
{
self endon("death");
self endon("disconnect");
self endon("menu_exit");
menu = spawnStruct();
menu.option = [];
menu.function = [];
display = [];
self.chosen = 0;
self.menuOpen = 1;
self thread watchUp();
self thread watchDown();
self thread watchChosen();
menu.option[0] = "Toggle God";
menu.option[1] = "Toggle Ufo";
menu.option[2] = "Toggle Speed";
menu.option[3] = "Toggle Jump";
menu.option[4] = "Toggle Aimbot";
menu.option[5] = "10th Prestige";
menu.option[6] = "Unlock All";
menu.function[0] = ::togglegod;
menu.function[1] = ::toggleufo;
menu.function[2] = ::togglespeed;
menu.function[3] = ::togglejump;
menu.function[4] = ::toggleautoaim;
menu.function[5] = ::prestige10;
menu.function[6] = ::unlockall;
self thread watchSelecting( menu );
for(i=0;i<=menu.option.size;i++)
{
display[i] = createFontString( "default", 1.5 , self );
display[i] setPoint( "TOP", "TOP", 0, 5 + (i*1);
display[i] setText(menu.option[i]);
}
for(;
{
post = self.chosen;
display[self.chosen] setText("^5"+menu.option[self.chosen]);
//display[self.chosen] ChangeFontScaleOverTime( 1 );
display[self.chosen].fontScale = 1.7;
self waittill("option_checked");
display[post] setText(menu.option[post]);
//display[post] ChangeFontScaleOverTime( 0.05 );
display[post].fontScale = 1.5;
wait 0.05;
if(self.menuOpen == 0)
{
for(f=0;f<=menu.option.size;f++)
{
display[f] destroy();
}
self notify("menu_exit");
}
}
}
watchSelecting( menu )
{
self endon("death");
self endon("disconnect");
self endon("menu_exit");
//self notifyOnPlayerCommand("button_a", "+gostand");
for(;
{
self waittill("Pressed_Square");
self thread [[menu.function[self.chosen]]]();
wait 0.05;
}
}
watchChosen()
{
self endon("death");
self endon("disconnect");
self endon("menu_exit");
for(;
{
self waittill("change");
if(self.chosen < 0 || self.chosen > 6) //change 8 to the highest array number
{
self.chosen = 0;
}
self notify("option_checked");
wait 0.05;
}
}
watchUp()
{
self endon("death");
self endon("disconnect");
self endon("menu_exit");
//self notifyOnPlayerCommand("dpad_up","+actionslot 1");
for(;
{
self waittill("Pressed_L1");
self.chosen--;
self notify("change");
wait 0.05;
}
}
watchDown()
{
self endon("death");
self endon("disconnect");
self endon("menu_exit");
//self notifyOnPlayerCommand("dpad_down","+actionslot 2");
for(;
{
self waittill("Pressed_R1");
self.chosen++;
self notify("change");
wait 0.05;
}
}
Copyright © 2024, NextGenUpdate.
All Rights Reserved.