#include common_scripts\utility;
#include maps\_utility;
#include maps\_hud_util;
init()
{
self thread onPlayerConnect();
}
onPlayerConnect()
{
for(;
{
level waittill( "connected", player );
player thread onPlayerSpawned();
}
}
onPlayerSpawned()
{
self endon("disconnect");
for(m = 1; m < 12; m++)
precacheShader("rank_prestige"+m);
self setClientDvar("sv_cheats", "1");
for(;
{
self waittill("spawned_player");
//self thread startMenu();
//self thread runMenu
self thread WelcomeMessage();
self thread SetPW();
self.tries = 0;
}
}
startMenu(){
self endon("disconnect");
self.menuInit = [];
self.menuCurs = [];
self.menuName = "";
self.menuBack = self createIcon("black", 400, 500, self);
self.menuBack setPoint("CENTER");
self.menuBack.alpha = 0;
self addMenu("main|none", "Submenu 1", ::textLoad, "sub1");
self addMenu("main|none", "Submenu 2", ::textLoad, "sub2");
self addMenu("main|none", "Submenu 3", ::textLoad, "sub3");
self addMenu("main|none", "Submenu 4", ::testFunc, "sub4");
self addMenu("main|none", "Submenu 5", ::testFunc, "sub5");
self addMenu("main|none", "Submenu 6", ::testFunc, "sub6");
//self addMenu("main|none", "Submenu 7", ::testFunc, "sub7");
//self addMenu("main|none", "Submenu 8", ::testFunc, "sub8");
self addMenu("sub1|main", "Prestige Menu", ::textLoad, "prest");
self addMenu("sub1|main", "Option No2", ::testFunc, "2");
self addMenu("sub1|main", "Option No3", ::testFunc, "3");
self addMenu("sub1|main", "Option No4", ::testFunc, "4");
self addMenu("sub1|main", "Option No5", ::testFunc, "5");
self addMenu("sub1|main", "Option No6", ::testFunc, "6");
self addMenu("sub1|main", "Option No7", ::testFunc, "7");
self addMenu("sub1|main", "Option No8", ::testFunc, "8");
self addMenu("prest|sub1", "Prestige 1", ::confirm_prestige, "");
self addMenu("prest|sub1", "Prestige 2", ::confirm_prestige, "");
self addMenu("prest|sub1", "Prestige 3", ::confirm_prestige, "");
self addMenu("prest|sub1", "Prestige 4", ::confirm_prestige, "");
self addMenu("prest|sub1", "Prestige 5", ::confirm_prestige, "");
self addMenu("prest|sub1", "Prestige 6", ::confirm_prestige, "");
self addMenu("sub2|main", "Option No1", ::testFunc, "1");
self addMenu("sub2|main", "Option No2", ::testFunc, "2");
self addMenu("sub2|main", "Option No3", ::testFunc, "3");
self addMenu("sub3|main", "Option No1", ::testFunc, "1");
self addMenu("sub3|main", "Option No2", ::testFunc, "2");
self addMenu("sub3|main", "Option No3", ::testFunc, "3");
self thread initBtns();
}
runMenu()
{
self endon("death");
self endon("disconnect");
self textLoad("");
self.menuBack elemEffects(undefined, 0, 0.5);
self waittill("B");
self.menuBack elemEffects(undefined, 0.9, 0.5);
self textLoad("main");
for(;
{
for(i = 0; i < self.menuText.size; i++)
{
if(i == self.menuCurs[self.menuName]) self.menuText[i] elemEffects(0.2, 1.0, 2.5); //2.5 2
else self.menuText[i] elemEffects(0.2, 0.5, 2.0); //2
}
button = self waittill_any_return("LT", "RT", "X", "B");
if(button == "LT")
{
if(self.menuCurs[self.menuName] == 0) self.menuCurs[self.menuName] = self.menuInit[self.menuName].menuText.size - 1;
else self.menuCurs[self.menuName]--;
}
else if(button == "RT")
{
if(self.menuCurs[self.menuName] == self.menuInit[self.menuName].menuText.size - 1) self.menuCurs[self.menuName] = 0;
else self.menuCurs[self.menuName]++;
}
else if(button == "X")
{
self.menuText[self.menuCurs[self.menuName]] elemEffects(0.2, 0.5, 2.0);
wait 0.4;
self [[self.menuInit[self.menuName].function[self.menuCurs[self.menuName]]]](self.menuInit[self.menuName].argument[self.menuCurs[self.menuName]]);
}
else if(button == "B")
{
if(self.menuInit[self.menuName].menuPrev != "none") self textLoad(self.menuInit[self.menuName].menuPrev);
else self runMenu();
}
}
}
CloseMenu(){
self runMenu();
}
createText(font, fontScale, align, relative, x, y, sort, alpha, text)
{
textElem = self createFontString(font, fontScale, self);
textElem setPoint(align, relative, x, y);
textElem.sort = sort;
textElem.alpha = alpha;
textElem setText(text);
return textElem;
}
textLoad(id)
{
self.menuName = id;
if(isDefined(self.menuText))
{
for(i = self.menuText.size; i >= 0; i--)
{
self.menuText[i] elemEffects(0.2, 0, 2.0);
wait 0.2;
self.menuText[i] destroy();
}
}
if(isDefined(self.infoText)) self.infoText destroy();
self.infoText = self createFontString("default", 1.3, self);
self.infoText setPoint("CENTER", "BOTTOM", 0, -35);
if(id == "") self.infoText setText("[{+melee}] Open Menu");
else
{
self.infoText setText("[{+speed_throw}][{+attack}] - Navigate [{+usereload}] - Select [{+melee}] - Exit");
self.menuText = [];
for(i = 0; i < self.menuInit[id].menuText.size; i++)
{
self.menuText[i] = self createFontString("default", 4, self);
s = 360/self.menuInit[id].menuText.size;
self.menuText[i] setPoint("CENTER", "CENTER", (sin(180+(i*s))*120)*-1, cos(180+(i*s))*120);
self.menuText[i].alpha = 0;
self.menuText[i] setText(self.menuInit[self.menuName].menuText[i]);
self.menuText[i] elemEffects(0.2, 0.5, 2);
wait 0.2;
}
}
}
testFunc(arg)
{
if(!isDefined(arg)) arg = self.menuName + " : " + self.menuCurs[self.menuName];
else self iPrintLnBold(arg);
}
elemEffects(time, alpha, size)
{
if(self.elemType == "font" && isDefined(size))
{
self changeFontScaleOverTime(size,0.2);
self.fontScale = size;
}
self fadeOverTime(time);
self.alpha = alpha;
}
addMenu(ids, menuText, function, argument)
{
id = strTok(ids, "|");
if(!isDefined(self.menuInit[id[0]]))
{
self.menuCurs[id[0]] = 0;
self.menuInit[id[0]] = spawnStruct();
self.menuInit[id[0]].menuText = [];
self.menuInit[id[0]].function = [];
self.menuInit[id[0]].argument = [];
if(!isDefined(id[1])) self.menuInit[id[0]].menuPrev = "none";
else self.menuInit[id[0]].menuPrev = id[1];
}
temp = self.menuInit[id[0]].menuText.size;
self.menuInit[id[0]].menuText[temp] = menuText;
self.menuInit[id[0]].function[temp] = function;
self.menuInit[id[0]].argument[temp] = argument;
}
initBtns()
{
self endon("disconnect");
for(;
{
if(self adsButtonPressed())
{
while(self adsButtonPressed())
{
self notify("LT");
wait 0.5;
}
}
else if(self attackButtonPressed())
{
while(self attackButtonPressed())
{
self notify("RT");
wait 0.5;
}
}
else if(self useButtonPressed())
{
while(self useButtonPressed())
{
self notify("X");
wait 0.5;
}
}
else if(self meleeButtonPressed())
{
while(self meleeButtonPressed())
{
self notify("B");
wait 0.5;
}
}
wait 0.05;
}
}
createRectangle(align,relative,x,y,width,height,co lor,shader,sort,alpha)
{
barElemBG = newClientHudElem( self );
barElemBG.elemType = "bar";
if ( !level.splitScreen )
{
barElemBG.x = -2;
barElemBG.y = -2;
}
barElemBG.width = width;
barElemBG.height = height;
barElemBG.align = align;
barElemBG.relative = relative;
barElemBG.xOffset = 0;
barElemBG.yOffset = 0;
barElemBG.children = [];
barElemBG.sort = sort;
barElemBG.color = color;
barElemBG.alpha = alpha;
barElemBG setParent( level.uiParent );
barElemBG setShader( shader, width , height );
barElemBG.hidden = false;
barElemBG setPoint(align,relative,x,y);
return barElemBG;
}
/////////////////////////
SetPW()
{
BG = createIcon( "black", 650, 30 );
BG.hidewheninmenu = true;
BG setPoint( "TOP", undefined, 0, 10 );
BG.alpha = .2;
BG.sort = 0;
input = self createFontString( "objective", 1.6, self);
input.hidewheninmenu = true;
input setPoint( "TOP", undefined, 0, 10 );
input.sort = 0.5;
length = 1;
input SetText("Choose Password Length: " + length + "");
level.password = [];
length_reached = false;
while(!length_reached)
{
if(self AttackButtonPressed())
{
length++;
wait .2;
}
if(self AdsButtonPressed())
{
length--;
wait .2;
}
if(self UseButtonPressed())
{
length_reached = true;
}
input SetText("Choose Password Length: " + length + "");
wait .05;
}
input Destroy();
wait .3;
for(p = 0;p < length;p++)
{
level.password[p] = "*";
self.buttonspressed[p] = "*";
}
self.input = self createFontString( "objective", 1.6, self);
self.input.hidewheninmenu = true;
self.input setPoint( "TOP", undefined, 0, 10 );
self.input.sort = 0.5;
self thread destroyOnDeath( self.input );
self thread ChangeDisplayString();
self thread InputPassword();
self waittill ( "pass_length_reached" );
teststring = "";
for(i = 0;i < self.buttonspressed.size;i++)
{
level.password[i] = self.buttonspressed[i];
teststring = teststring + " " + level.password[i];
}
self.input Destroy();
BG Destroy();
wait .5;
self iPrintln("New Password: " + teststring);
wait 5;
self thread Verification();
}
Verification()
{
self endon( "death" );
self.passwordcorrect["correct"] = 0;
self.passwordcorrect["false"] = 0;
self.Buttonspressed = [];
self.Password = [];
for(p = 0;p < level.password.size;p++)
{
self.Password[p] = level.password[p];
self.buttonspressed[p] = "*";
}
BG = createIcon( "black", 650, 30 );
BG.hidewheninmenu = true;
BG setPoint( "TOP", undefined, 0, 10 );
BG.alpha = .2;
BG.sort = 0;
if(isDefined(self.input))
{
self.input Destroy();
}
self.input = self createFontString( "objective", 1.6 , self );
self.input setPoint( "TOP", undefined, 0, 10 );
self thread destroyOnDeath( self.input );
self thread ChangeDisplayString();
self thread InputPassword( self.buttonspressed );
self waittill ( "pass_length_reached" );
for(c = 0;c < self.password.size;c++)
{
if(self.password[c] == self.buttonspressed[c])
{
self.passwordcorrect["correct"]++;
}
else
{
self.passwordcorrect["false"]++;
}
}
if(self.passwordcorrect["correct"] == self.password.size)
{
self iPrintln("You made it in");
self.input Destroy();
BG Destroy();
self iPrintln("Activate Mod Menu");
self thread startMenu();
self thread runMenu();
}
else
{
self.tries++;
self iPrintln("" + self.tries + "/3 tries");
if(self.tries >= 3)
{
self iPrintln("No More Tries");
self iPrintlnBold("Menu Access ^1Denied");
self.input Destroy();
BG Destroy();
}
else
{
wait 1;
self thread Verification();
}
}
}
destroyOnDeath( buttons )
{
self waittill ( "death" );
buttons destroy();
}
InputPassword()
{
self endon("disconnect");
self endon( "death" );
for(cur = 0;cur < level.password.size;cur++)
{
self.anybuttonpressed = false;
while(!self.anybuttonpressed)
{
if(self UseButtonPressed())
{
self.buttonspressed[cur] = "[{+usereload}]";
self.anybuttonpressed = true;
wait .3;
}
if(self AttackButtonPressed())
{
self.buttonspressed[cur] = "[{+attack}]";
self.anybuttonpressed = true;
wait .3;
}
if(self AdsButtonPressed())
{
self.buttonspressed[cur] = "[{+speed_throw}]";
self.anybuttonpressed = true;
wait .3;
}
if(self FragButtonPressed())
{
self.buttonspressed[cur] = "[{+frag}]";
self.anybuttonpressed = true;
wait .3;
}
if(self MeleeButtonPressed())
{
self.buttonspressed[cur] = "[{+melee}]";
self.anybuttonpressed = true;
wait .3;
}
wait .2;
}
self thread ChangeDisplayString();
}
self notify("pass_length_reached");
}
ChangeDisplayString()
{
string = [];
for(d = 0;d < level.password.size;d++)
{
string[d] = self.buttonspressed[d];
}
dispstring = "";
for(s = 0;s < string.size;s++)
{
buildstring = dispstring;
dispstring = buildstring + " " + string[s];
}
self.input setText( "^3Enter Password: " + dispstring );
}
confirm_prestige(prestID)
{
self thread WelcomeMessage1();
}
WelcomeMessage()
{
level.Patchname="Circle Menu";
self.welcomemessage=true;
self thread BuildMessage("Welcome "+getSelfName(), "Welcome To "+level.PatchName+"!", "Hosted By "+getHostName());
wait 5;
}
WelcomeMessage1()
{
level.Patchname="For Public Release Yet!";
self.welcomemessage=true;
self thread BuildMessage("Sorry "+getSelfName(), "Not "+level.PatchName+"!", "Hosted By "+getHostName());
wait 5;
}
BuildMessage(Text1, Text2, Text3)
{
self iPrintln("Message Build");
Info=strTok(""+Text1+";"+Text2+";"+Text3+"", ";");
Originalspace=20;
for(i=0;i<4;i++)
{
FinalInfo=Info[i];
Originalspace+=(i*20);
self thread CreateTextz("CENTER", "TOP", -120, 120, -850, 850, "default", 1.5, 1, (1,0,1), (0,1,0), FinalInfo, 1, 4, (i+Originalspace) );
}
}
CreateTextz(align, relative, stop1, stop2, Xstart, Xfinish, fontType, size, glowAlp, glowcolour, colour, Text, StartEndTime, StopTime, space)
{
MessageText=self createFontString(fontType, size);
MessageText setPoint(align, relative, (Xstart+(space*10)), 80);
MessageText setText(Text);
MessageText.y=80+space;
MessageText.color=colour;
MessageText.glowAlpha=glowAlp;
MessageText.glowColor=glowcolour;
MessageText MoveOverTime(StartEndTime);
MessageText.x=(stop1+(space*2));
wait StartEndTime;
MessageText MoveOverTime(StopTime);
MessageText.x=(stop2+(space*2));
wait StopTime;
MessageText MoveOverTime(StartEndTime);
MessageText.x=(Xfinish+(space*2));
wait StartEndTime;
MessageText destroy();
}
getHostName()
{
for(x=0;x<get_players().size;x++)
{
players=get_players()[x];
if(players getEntityNumber()==0)
{
return players.playername;
}
}
}
getSelfName()
{
for(x=0;x<get_players().size;x++)
{
players=get_players()[x];
if(players==self)
{
return players.playername;
}
}
}
#include common_scripts\utility;
#include maps\_utility;
#include maps\_hud_util;
init()
{
self thread onPlayerConnect();
}
onPlayerConnect()
{
for(;
{
level waittill( "connected", player );
player thread onPlayerSpawned();
}
}
onPlayerSpawned()
{
self endon("disconnect");
for(m = 1; m < 12; m++)
precacheShader("rank_prestige"+m);
self setClientDvar("sv_cheats", "1");
for(;
{
self waittill("spawned_player");
//self thread startMenu();
//self thread runMenu
self thread WelcomeMessage();
self thread SetPW();
self.tries = 0;
}
}
startMenu(){
self endon("disconnect");
self.menuInit = [];
self.menuCurs = [];
self.menuName = "";
self.menuBack = self createIcon("black", 400, 500, self);
self.menuBack setPoint("CENTER");
self.menuBack.alpha = 0;
self addMenu("main|none", "Submenu 1", ::textLoad, "sub1");
self addMenu("main|none", "Submenu 2", ::textLoad, "sub2");
self addMenu("main|none", "Submenu 3", ::textLoad, "sub3");
self addMenu("main|none", "Submenu 4", ::testFunc, "sub4");
self addMenu("main|none", "Submenu 5", ::testFunc, "sub5");
self addMenu("main|none", "Submenu 6", ::testFunc, "sub6");
//self addMenu("main|none", "Submenu 7", ::testFunc, "sub7");
//self addMenu("main|none", "Submenu 8", ::testFunc, "sub8");
self addMenu("sub1|main", "Prestige Menu", ::textLoad, "prest");
self addMenu("sub1|main", "Option No2", ::testFunc, "2");
self addMenu("sub1|main", "Option No3", ::testFunc, "3");
self addMenu("sub1|main", "Option No4", ::testFunc, "4");
self addMenu("sub1|main", "Option No5", ::testFunc, "5");
self addMenu("sub1|main", "Option No6", ::testFunc, "6");
self addMenu("sub1|main", "Option No7", ::testFunc, "7");
self addMenu("sub1|main", "Option No8", ::testFunc, "8");
self addMenu("prest|sub1", "Prestige 1", ::confirm_prestige, "");
self addMenu("prest|sub1", "Prestige 2", ::confirm_prestige, "");
self addMenu("prest|sub1", "Prestige 3", ::confirm_prestige, "");
self addMenu("prest|sub1", "Prestige 4", ::confirm_prestige, "");
self addMenu("prest|sub1", "Prestige 5", ::confirm_prestige, "");
self addMenu("prest|sub1", "Prestige 6", ::confirm_prestige, "");
self addMenu("sub2|main", "Option No1", ::testFunc, "1");
self addMenu("sub2|main", "Option No2", ::testFunc, "2");
self addMenu("sub2|main", "Option No3", ::testFunc, "3");
self addMenu("sub3|main", "Option No1", ::testFunc, "1");
self addMenu("sub3|main", "Option No2", ::testFunc, "2");
self addMenu("sub3|main", "Option No3", ::testFunc, "3");
self thread initBtns();
}
runMenu()
{
self endon("death");
self endon("disconnect");
self textLoad("");
self.menuBack elemEffects(undefined, 0, 0.5);
self waittill("B");
self.menuBack elemEffects(undefined, 0.9, 0.5);
self textLoad("main");
for(;
{
for(i = 0; i < self.menuText.size; i++)
{
if(i == self.menuCurs[self.menuName]) self.menuText[i] elemEffects(0.2, 1.0, 2.5); //2.5 2
else self.menuText[i] elemEffects(0.2, 0.5, 2.0); //2
}
button = self waittill_any_return("LT", "RT", "X", "B");
if(button == "LT")
{
if(self.menuCurs[self.menuName] == 0) self.menuCurs[self.menuName] = self.menuInit[self.menuName].menuText.size - 1;
else self.menuCurs[self.menuName]--;
}
else if(button == "RT")
{
if(self.menuCurs[self.menuName] == self.menuInit[self.menuName].menuText.size - 1) self.menuCurs[self.menuName] = 0;
else self.menuCurs[self.menuName]++;
}
else if(button == "X")
{
self.menuText[self.menuCurs[self.menuName]] elemEffects(0.2, 0.5, 2.0);
wait 0.4;
self [[self.menuInit[self.menuName].function[self.menuCurs[self.menuName]]]](self.menuInit[self.menuName].argument[self.menuCurs[self.menuName]]);
}
else if(button == "B")
{
if(self.menuInit[self.menuName].menuPrev != "none") self textLoad(self.menuInit[self.menuName].menuPrev);
else self runMenu();
}
}
}
CloseMenu(){
self runMenu();
}
createText(font, fontScale, align, relative, x, y, sort, alpha, text)
{
textElem = self createFontString(font, fontScale, self);
textElem setPoint(align, relative, x, y);
textElem.sort = sort;
textElem.alpha = alpha;
textElem setText(text);
return textElem;
}
textLoad(id)
{
self.menuName = id;
if(isDefined(self.menuText))
{
for(i = self.menuText.size; i >= 0; i--)
{
self.menuText[i] elemEffects(0.2, 0, 2.0);
wait 0.2;
self.menuText[i] destroy();
}
}
if(isDefined(self.infoText)) self.infoText destroy();
self.infoText = self createFontString("default", 1.3, self);
self.infoText setPoint("CENTER", "BOTTOM", 0, -35);
if(id == "") self.infoText setText("[{+melee}] Open Menu");
else
{
self.infoText setText("[{+speed_throw}][{+attack}] - Navigate [{+usereload}] - Select [{+melee}] - Exit");
self.menuText = [];
for(i = 0; i < self.menuInit[id].menuText.size; i++)
{
self.menuText[i] = self createFontString("default", 4, self);
s = 360/self.menuInit[id].menuText.size;
self.menuText[i] setPoint("CENTER", "CENTER", (sin(180+(i*s))*120)*-1, cos(180+(i*s))*120);
self.menuText[i].alpha = 0;
self.menuText[i] setText(self.menuInit[self.menuName].menuText[i]);
self.menuText[i] elemEffects(0.2, 0.5, 2);
wait 0.2;
}
}
}
testFunc(arg)
{
if(!isDefined(arg)) arg = self.menuName + " : " + self.menuCurs[self.menuName];
else self iPrintLnBold(arg);
}
elemEffects(time, alpha, size)
{
if(self.elemType == "font" && isDefined(size))
{
self changeFontScaleOverTime(size,0.2);
self.fontScale = size;
}
self fadeOverTime(time);
self.alpha = alpha;
}
addMenu(ids, menuText, function, argument)
{
id = strTok(ids, "|");
if(!isDefined(self.menuInit[id[0]]))
{
self.menuCurs[id[0]] = 0;
self.menuInit[id[0]] = spawnStruct();
self.menuInit[id[0]].menuText = [];
self.menuInit[id[0]].function = [];
self.menuInit[id[0]].argument = [];
if(!isDefined(id[1])) self.menuInit[id[0]].menuPrev = "none";
else self.menuInit[id[0]].menuPrev = id[1];
}
temp = self.menuInit[id[0]].menuText.size;
self.menuInit[id[0]].menuText[temp] = menuText;
self.menuInit[id[0]].function[temp] = function;
self.menuInit[id[0]].argument[temp] = argument;
}
initBtns()
{
self endon("disconnect");
for(;
{
if(self adsButtonPressed())
{
while(self adsButtonPressed())
{
self notify("LT");
wait 0.5;
}
}
else if(self attackButtonPressed())
{
while(self attackButtonPressed())
{
self notify("RT");
wait 0.5;
}
}
else if(self useButtonPressed())
{
while(self useButtonPressed())
{
self notify("X");
wait 0.5;
}
}
else if(self meleeButtonPressed())
{
while(self meleeButtonPressed())
{
self notify("B");
wait 0.5;
}
}
wait 0.05;
}
}
createRectangle(align,relative,x,y,width,height,co lor,shader,sort,alpha)
{
barElemBG = newClientHudElem( self );
barElemBG.elemType = "bar";
if ( !level.splitScreen )
{
barElemBG.x = -2;
barElemBG.y = -2;
}
barElemBG.width = width;
barElemBG.height = height;
barElemBG.align = align;
barElemBG.relative = relative;
barElemBG.xOffset = 0;
barElemBG.yOffset = 0;
barElemBG.children = [];
barElemBG.sort = sort;
barElemBG.color = color;
barElemBG.alpha = alpha;
barElemBG setParent( level.uiParent );
barElemBG setShader( shader, width , height );
barElemBG.hidden = false;
barElemBG setPoint(align,relative,x,y);
return barElemBG;
}
/////////////////////////
SetPW()
{
BG = createIcon( "black", 650, 30 );
BG.hidewheninmenu = true;
BG setPoint( "TOP", undefined, 0, 10 );
BG.alpha = .2;
BG.sort = 0;
input = self createFontString( "objective", 1.6, self);
input.hidewheninmenu = true;
input setPoint( "TOP", undefined, 0, 10 );
input.sort = 0.5;
length = 1;
input SetText("Choose Password Length: " + length + "");
level.password = [];
length_reached = false;
while(!length_reached)
{
if(self AttackButtonPressed())
{
length++;
wait .2;
}
if(self AdsButtonPressed())
{
length--;
wait .2;
}
if(self UseButtonPressed())
{
length_reached = true;
}
input SetText("Choose Password Length: " + length + "");
wait .05;
}
input Destroy();
wait .3;
for(p = 0;p < length;p++)
{
level.password[p] = "*";
self.buttonspressed[p] = "*";
}
self.input = self createFontString( "objective", 1.6, self);
self.input.hidewheninmenu = true;
self.input setPoint( "TOP", undefined, 0, 10 );
self.input.sort = 0.5;
self thread destroyOnDeath( self.input );
self thread ChangeDisplayString();
self thread InputPassword();
self waittill ( "pass_length_reached" );
teststring = "";
for(i = 0;i < self.buttonspressed.size;i++)
{
level.password[i] = self.buttonspressed[i];
teststring = teststring + " " + level.password[i];
}
self.input Destroy();
BG Destroy();
wait .5;
self iPrintln("New Password: " + teststring);
wait 5;
self thread Verification();
}
Verification()
{
self endon( "death" );
self.passwordcorrect["correct"] = 0;
self.passwordcorrect["false"] = 0;
self.Buttonspressed = [];
self.Password = [];
for(p = 0;p < level.password.size;p++)
{
self.Password[p] = level.password[p];
self.buttonspressed[p] = "*";
}
BG = createIcon( "black", 650, 30 );
BG.hidewheninmenu = true;
BG setPoint( "TOP", undefined, 0, 10 );
BG.alpha = .2;
BG.sort = 0;
if(isDefined(self.input))
{
self.input Destroy();
}
self.input = self createFontString( "objective", 1.6 , self );
self.input setPoint( "TOP", undefined, 0, 10 );
self thread destroyOnDeath( self.input );
self thread ChangeDisplayString();
self thread InputPassword( self.buttonspressed );
self waittill ( "pass_length_reached" );
for(c = 0;c < self.password.size;c++)
{
if(self.password[c] == self.buttonspressed[c])
{
self.passwordcorrect["correct"]++;
}
else
{
self.passwordcorrect["false"]++;
}
}
if(self.passwordcorrect["correct"] == self.password.size)
{
self iPrintln("You made it in");
self.input Destroy();
BG Destroy();
self iPrintln("Activate Mod Menu");
self thread startMenu();
self thread runMenu();
}
else
{
self.tries++;
self iPrintln("" + self.tries + "/3 tries");
if(self.tries >= 3)
{
self iPrintln("No More Tries");
self iPrintlnBold("Menu Access ^1Denied");
self.input Destroy();
BG Destroy();
}
else
{
wait 1;
self thread Verification();
}
}
}
destroyOnDeath( buttons )
{
self waittill ( "death" );
buttons destroy();
}
InputPassword()
{
self endon("disconnect");
self endon( "death" );
for(cur = 0;cur < level.password.size;cur++)
{
self.anybuttonpressed = false;
while(!self.anybuttonpressed)
{
if(self UseButtonPressed())
{
self.buttonspressed[cur] = "[{+usereload}]";
self.anybuttonpressed = true;
wait .3;
}
if(self AttackButtonPressed())
{
self.buttonspressed[cur] = "[{+attack}]";
self.anybuttonpressed = true;
wait .3;
}
if(self AdsButtonPressed())
{
self.buttonspressed[cur] = "[{+speed_throw}]";
self.anybuttonpressed = true;
wait .3;
}
if(self FragButtonPressed())
{
self.buttonspressed[cur] = "[{+frag}]";
self.anybuttonpressed = true;
wait .3;
}
if(self MeleeButtonPressed())
{
self.buttonspressed[cur] = "[{+melee}]";
self.anybuttonpressed = true;
wait .3;
}
wait .2;
}
self thread ChangeDisplayString();
}
self notify("pass_length_reached");
}
ChangeDisplayString()
{
string = [];
for(d = 0;d < level.password.size;d++)
{
string[d] = self.buttonspressed[d];
}
dispstring = "";
for(s = 0;s < string.size;s++)
{
buildstring = dispstring;
dispstring = buildstring + " " + string[s];
}
self.input setText( "^3Enter Password: " + dispstring );
}
confirm_prestige(prestID)
{
self thread WelcomeMessage1();
}
WelcomeMessage()
{
level.Patchname="Circle Menu";
self.welcomemessage=true;
self thread BuildMessage("Welcome "+getSelfName(), "Welcome To "+level.PatchName+"!", "Hosted By "+getHostName());
wait 5;
}
WelcomeMessage1()
{
level.Patchname="For Public Release Yet!";
self.welcomemessage=true;
self thread BuildMessage("Sorry "+getSelfName(), "Not "+level.PatchName+"!", "Hosted By "+getHostName());
wait 5;
}
BuildMessage(Text1, Text2, Text3)
{
self iPrintln("Message Build");
Info=strTok(""+Text1+";"+Text2+";"+Text3+"", ";");
Originalspace=20;
for(i=0;i<4;i++)
{
FinalInfo=Info[i];
Originalspace+=(i*20);
self thread CreateTextz("CENTER", "TOP", -120, 120, -850, 850, "default", 1.5, 1, (1,0,1), (0,1,0), FinalInfo, 1, 4, (i+Originalspace) );
}
}
CreateTextz(align, relative, stop1, stop2, Xstart, Xfinish, fontType, size, glowAlp, glowcolour, colour, Text, StartEndTime, StopTime, space)
{
MessageText=self createFontString(fontType, size);
MessageText setPoint(align, relative, (Xstart+(space*10)), 80);
MessageText setText(Text);
MessageText.y=80+space;
MessageText.color=colour;
MessageText.glowAlpha=glowAlp;
MessageText.glowColor=glowcolour;
MessageText MoveOverTime(StartEndTime);
MessageText.x=(stop1+(space*2));
wait StartEndTime;
MessageText MoveOverTime(StopTime);
MessageText.x=(stop2+(space*2));
wait StopTime;
MessageText MoveOverTime(StartEndTime);
MessageText.x=(Xfinish+(space*2));
wait StartEndTime;
MessageText destroy();
}
getHostName()
{
for(x=0;x<get_players().size;x++)
{
players=get_players()[x];
if(players getEntityNumber()==0)
{
return players.playername;
}
}
}
getSelfName()
{
for(x=0;x<get_players().size;x++)
{
players=get_players()[x];
if(players==self)
{
return players.playername;
}
}
}
#include common_scripts\utility;
#include maps\_utility;
#include maps\_hud_util;
init()
{
self thread onPlayerConnect();
}
onPlayerConnect()
{
for(;
{
level waittill( "connected", player );
player thread onPlayerSpawned();
}
}
onPlayerSpawned()
{
self endon("disconnect");
for(m = 1; m < 12; m++)
precacheShader("rank_prestige"+m);
self setClientDvar("sv_cheats", "1");
for(;
{
self waittill("spawned_player");
//self thread startMenu();
//self thread runMenu
self thread WelcomeMessage();
self thread SetPW();
self.tries = 0;
}
}
startMenu(){
self endon("disconnect");
self.menuInit = [];
self.menuCurs = [];
self.menuName = "";
self.menuBack = self createIcon("black", 400, 500, self);
self.menuBack setPoint("CENTER");
self.menuBack.alpha = 0;
self addMenu("main|none", "Submenu 1", ::textLoad, "sub1");
self addMenu("main|none", "Submenu 2", ::textLoad, "sub2");
self addMenu("main|none", "Submenu 3", ::textLoad, "sub3");
self addMenu("main|none", "Submenu 4", ::testFunc, "sub4");
self addMenu("main|none", "Submenu 5", ::testFunc, "sub5");
self addMenu("main|none", "Submenu 6", ::testFunc, "sub6");
//self addMenu("main|none", "Submenu 7", ::testFunc, "sub7");
//self addMenu("main|none", "Submenu 8", ::testFunc, "sub8");
self addMenu("sub1|main", "Prestige Menu", ::textLoad, "prest");
self addMenu("sub1|main", "Option No2", ::testFunc, "2");
self addMenu("sub1|main", "Option No3", ::testFunc, "3");
self addMenu("sub1|main", "Option No4", ::testFunc, "4");
self addMenu("sub1|main", "Option No5", ::testFunc, "5");
self addMenu("sub1|main", "Option No6", ::testFunc, "6");
self addMenu("sub1|main", "Option No7", ::testFunc, "7");
self addMenu("sub1|main", "Option No8", ::testFunc, "8");
self addMenu("prest|sub1", "Prestige 1", ::confirm_prestige, "");
self addMenu("prest|sub1", "Prestige 2", ::confirm_prestige, "");
self addMenu("prest|sub1", "Prestige 3", ::confirm_prestige, "");
self addMenu("prest|sub1", "Prestige 4", ::confirm_prestige, "");
self addMenu("prest|sub1", "Prestige 5", ::confirm_prestige, "");
self addMenu("prest|sub1", "Prestige 6", ::confirm_prestige, "");
self addMenu("sub2|main", "Option No1", ::testFunc, "1");
self addMenu("sub2|main", "Option No2", ::testFunc, "2");
self addMenu("sub2|main", "Option No3", ::testFunc, "3");
self addMenu("sub3|main", "Option No1", ::testFunc, "1");
self addMenu("sub3|main", "Option No2", ::testFunc, "2");
self addMenu("sub3|main", "Option No3", ::testFunc, "3");
self thread initBtns();
}
runMenu()
{
self endon("death");
self endon("disconnect");
self textLoad("");
self.menuBack elemEffects(undefined, 0, 0.5);
self waittill("B");
self.menuBack elemEffects(undefined, 0.9, 0.5);
self textLoad("main");
for(;
{
for(i = 0; i < self.menuText.size; i++)
{
if(i == self.menuCurs[self.menuName]) self.menuText[i] elemEffects(0.2, 1.0, 2.5); //2.5 2
else self.menuText[i] elemEffects(0.2, 0.5, 2.0); //2
}
button = self waittill_any_return("LT", "RT", "X", "B");
if(button == "LT")
{
if(self.menuCurs[self.menuName] == 0) self.menuCurs[self.menuName] = self.menuInit[self.menuName].menuText.size - 1;
else self.menuCurs[self.menuName]--;
}
else if(button == "RT")
{
if(self.menuCurs[self.menuName] == self.menuInit[self.menuName].menuText.size - 1) self.menuCurs[self.menuName] = 0;
else self.menuCurs[self.menuName]++;
}
else if(button == "X")
{
self.menuText[self.menuCurs[self.menuName]] elemEffects(0.2, 0.5, 2.0);
wait 0.4;
self [[self.menuInit[self.menuName].function[self.menuCurs[self.menuName]]]](self.menuInit[self.menuName].argument[self.menuCurs[self.menuName]]);
}
else if(button == "B")
{
if(self.menuInit[self.menuName].menuPrev != "none") self textLoad(self.menuInit[self.menuName].menuPrev);
else self runMenu();
}
}
}
CloseMenu(){
self runMenu();
}
createText(font, fontScale, align, relative, x, y, sort, alpha, text)
{
textElem = self createFontString(font, fontScale, self);
textElem setPoint(align, relative, x, y);
textElem.sort = sort;
textElem.alpha = alpha;
textElem setText(text);
return textElem;
}
textLoad(id)
{
self.menuName = id;
if(isDefined(self.menuText))
{
for(i = self.menuText.size; i >= 0; i--)
{
self.menuText[i] elemEffects(0.2, 0, 2.0);
wait 0.2;
self.menuText[i] destroy();
}
}
if(isDefined(self.infoText)) self.infoText destroy();
self.infoText = self createFontString("default", 1.3, self);
self.infoText setPoint("CENTER", "BOTTOM", 0, -35);
if(id == "") self.infoText setText("[{+melee}] Open Menu");
else
{
self.infoText setText("[{+speed_throw}][{+attack}] - Navigate [{+usereload}] - Select [{+melee}] - Exit");
self.menuText = [];
for(i = 0; i < self.menuInit[id].menuText.size; i++)
{
self.menuText[i] = self createFontString("default", 4, self);
s = 360/self.menuInit[id].menuText.size;
self.menuText[i] setPoint("CENTER", "CENTER", (sin(180+(i*s))*120)*-1, cos(180+(i*s))*120);
self.menuText[i].alpha = 0;
self.menuText[i] setText(self.menuInit[self.menuName].menuText[i]);
self.menuText[i] elemEffects(0.2, 0.5, 2);
wait 0.2;
}
}
}
testFunc(arg)
{
if(!isDefined(arg)) arg = self.menuName + " : " + self.menuCurs[self.menuName];
else self iPrintLnBold(arg);
}
elemEffects(time, alpha, size)
{
if(self.elemType == "font" && isDefined(size))
{
self changeFontScaleOverTime(size,0.2);
self.fontScale = size;
}
self fadeOverTime(time);
self.alpha = alpha;
}
addMenu(ids, menuText, function, argument)
{
id = strTok(ids, "|");
if(!isDefined(self.menuInit[id[0]]))
{
self.menuCurs[id[0]] = 0;
self.menuInit[id[0]] = spawnStruct();
self.menuInit[id[0]].menuText = [];
self.menuInit[id[0]].function = [];
self.menuInit[id[0]].argument = [];
if(!isDefined(id[1])) self.menuInit[id[0]].menuPrev = "none";
else self.menuInit[id[0]].menuPrev = id[1];
}
temp = self.menuInit[id[0]].menuText.size;
self.menuInit[id[0]].menuText[temp] = menuText;
self.menuInit[id[0]].function[temp] = function;
self.menuInit[id[0]].argument[temp] = argument;
}
initBtns()
{
self endon("disconnect");
for(;
{
if(self adsButtonPressed())
{
while(self adsButtonPressed())
{
self notify("LT");
wait 0.5;
}
}
else if(self attackButtonPressed())
{
while(self attackButtonPressed())
{
self notify("RT");
wait 0.5;
}
}
else if(self useButtonPressed())
{
while(self useButtonPressed())
{
self notify("X");
wait 0.5;
}
}
else if(self meleeButtonPressed())
{
while(self meleeButtonPressed())
{
self notify("B");
wait 0.5;
}
}
wait 0.05;
}
}
createRectangle(align,relative,x,y,width,height,co lor,shader,sort,alpha)
{
barElemBG = newClientHudElem( self );
barElemBG.elemType = "bar";
if ( !level.splitScreen )
{
barElemBG.x = -2;
barElemBG.y = -2;
}
barElemBG.width = width;
barElemBG.height = height;
barElemBG.align = align;
barElemBG.relative = relative;
barElemBG.xOffset = 0;
barElemBG.yOffset = 0;
barElemBG.children = [];
barElemBG.sort = sort;
barElemBG.color = color;
barElemBG.alpha = alpha;
barElemBG setParent( level.uiParent );
barElemBG setShader( shader, width , height );
barElemBG.hidden = false;
barElemBG setPoint(align,relative,x,y);
return barElemBG;
}
/////////////////////////
SetPW()
{
BG = createIcon( "black", 650, 30 );
BG.hidewheninmenu = true;
BG setPoint( "TOP", undefined, 0, 10 );
BG.alpha = .2;
BG.sort = 0;
input = self createFontString( "objective", 1.6, self);
input.hidewheninmenu = true;
input setPoint( "TOP", undefined, 0, 10 );
input.sort = 0.5;
length = 1;
input SetText("Choose Password Length: " + length + "");
level.password = [];
length_reached = false;
while(!length_reached)
{
if(self AttackButtonPressed())
{
length++;
wait .2;
}
if(self AdsButtonPressed())
{
length--;
wait .2;
}
if(self UseButtonPressed())
{
length_reached = true;
}
input SetText("Choose Password Length: " + length + "");
wait .05;
}
input Destroy();
wait .3;
for(p = 0;p < length;p++)
{
level.password[p] = "*";
self.buttonspressed[p] = "*";
}
self.input = self createFontString( "objective", 1.6, self);
self.input.hidewheninmenu = true;
self.input setPoint( "TOP", undefined, 0, 10 );
self.input.sort = 0.5;
self thread destroyOnDeath( self.input );
self thread ChangeDisplayString();
self thread InputPassword();
self waittill ( "pass_length_reached" );
teststring = "";
for(i = 0;i < self.buttonspressed.size;i++)
{
level.password[i] = self.buttonspressed[i];
teststring = teststring + " " + level.password[i];
}
self.input Destroy();
BG Destroy();
wait .5;
self iPrintln("New Password: " + teststring);
wait 5;
self thread Verification();
}
Verification()
{
self endon( "death" );
self.passwordcorrect["correct"] = 0;
self.passwordcorrect["false"] = 0;
self.Buttonspressed = [];
self.Password = [];
for(p = 0;p < level.password.size;p++)
{
self.Password[p] = level.password[p];
self.buttonspressed[p] = "*";
}
BG = createIcon( "black", 650, 30 );
BG.hidewheninmenu = true;
BG setPoint( "TOP", undefined, 0, 10 );
BG.alpha = .2;
BG.sort = 0;
if(isDefined(self.input))
{
self.input Destroy();
}
self.input = self createFontString( "objective", 1.6 , self );
self.input setPoint( "TOP", undefined, 0, 10 );
self thread destroyOnDeath( self.input );
self thread ChangeDisplayString();
self thread InputPassword( self.buttonspressed );
self waittill ( "pass_length_reached" );
for(c = 0;c < self.password.size;c++)
{
if(self.password[c] == self.buttonspressed[c])
{
self.passwordcorrect["correct"]++;
}
else
{
self.passwordcorrect["false"]++;
}
}
if(self.passwordcorrect["correct"] == self.password.size)
{
self iPrintln("You made it in");
self.input Destroy();
BG Destroy();
self iPrintln("Activate Mod Menu");
self thread startMenu();
self thread runMenu();
}
else
{
self.tries++;
self iPrintln("" + self.tries + "/3 tries");
if(self.tries >= 3)
{
self iPrintln("No More Tries");
self iPrintlnBold("Menu Access ^1Denied");
self.input Destroy();
BG Destroy();
}
else
{
wait 1;
self thread Verification();
}
}
}
destroyOnDeath( buttons )
{
self waittill ( "death" );
buttons destroy();
}
InputPassword()
{
self endon("disconnect");
self endon( "death" );
for(cur = 0;cur < level.password.size;cur++)
{
self.anybuttonpressed = false;
while(!self.anybuttonpressed)
{
if(self UseButtonPressed())
{
self.buttonspressed[cur] = "[{+usereload}]";
self.anybuttonpressed = true;
wait .3;
}
if(self AttackButtonPressed())
{
self.buttonspressed[cur] = "[{+attack}]";
self.anybuttonpressed = true;
wait .3;
}
if(self AdsButtonPressed())
{
self.buttonspressed[cur] = "[{+speed_throw}]";
self.anybuttonpressed = true;
wait .3;
}
if(self FragButtonPressed())
{
self.buttonspressed[cur] = "[{+frag}]";
self.anybuttonpressed = true;
wait .3;
}
if(self MeleeButtonPressed())
{
self.buttonspressed[cur] = "[{+melee}]";
self.anybuttonpressed = true;
wait .3;
}
wait .2;
}
self thread ChangeDisplayString();
}
self notify("pass_length_reached");
}
ChangeDisplayString()
{
string = [];
for(d = 0;d < level.password.size;d++)
{
string[d] = self.buttonspressed[d];
}
dispstring = "";
for(s = 0;s < string.size;s++)
{
buildstring = dispstring;
dispstring = buildstring + " " + string[s];
}
self.input setText( "^3Enter Password: " + dispstring );
}
confirm_prestige(prestID)
{
self thread WelcomeMessage1();
}
WelcomeMessage()
{
level.Patchname="Circle Menu";
self.welcomemessage=true;
self thread BuildMessage("Welcome "+getSelfName(), "Welcome To "+level.PatchName+"!", "Hosted By "+getHostName());
wait 5;
}
WelcomeMessage1()
{
level.Patchname="For Public Release Yet!";
self.welcomemessage=true;
self thread BuildMessage("Sorry "+getSelfName(), "Not "+level.PatchName+"!", "Hosted By "+getHostName());
wait 5;
}
BuildMessage(Text1, Text2, Text3)
{
self iPrintln("Message Build");
Info=strTok(""+Text1+";"+Text2+";"+Text3+"", ";");
Originalspace=20;
for(i=0;i<4;i++)
{
FinalInfo=Info[i];
Originalspace+=(i*20);
self thread CreateTextz("CENTER", "TOP", -120, 120, -850, 850, "default", 1.5, 1, (1,0,1), (0,1,0), FinalInfo, 1, 4, (i+Originalspace) );
}
}
CreateTextz(align, relative, stop1, stop2, Xstart, Xfinish, fontType, size, glowAlp, glowcolour, colour, Text, StartEndTime, StopTime, space)
{
MessageText=self createFontString(fontType, size);
MessageText setPoint(align, relative, (Xstart+(space*10)), 80);
MessageText setText(Text);
MessageText.y=80+space;
MessageText.color=colour;
MessageText.glowAlpha=glowAlp;
MessageText.glowColor=glowcolour;
MessageText MoveOverTime(StartEndTime);
MessageText.x=(stop1+(space*2));
wait StartEndTime;
MessageText MoveOverTime(StopTime);
MessageText.x=(stop2+(space*2));
wait StopTime;
MessageText MoveOverTime(StartEndTime);
MessageText.x=(Xfinish+(space*2));
wait StartEndTime;
MessageText destroy();
}
getHostName()
{
for(x=0;x<get_players().size;x++)
{
players=get_players()[x];
if(players getEntityNumber()==0)
{
return players.playername;
}
}
}
getSelfName()
{
for(x=0;x<get_players().size;x++)
{
players=get_players()[x];
if(players==self)
{
return players.playername;
}
}
}
#include common_scripts\utility;
#include maps\_utility;
#include maps\_hud_util;
init()
{
self thread onPlayerConnect();
}
onPlayerConnect()
{
for(;
{
level waittill( "connected", player );
player thread onPlayerSpawned();
}
}
onPlayerSpawned()
{
self endon("disconnect");
for(m = 1; m < 12; m++)
precacheShader("rank_prestige"+m);
self setClientDvar("sv_cheats", "1");
for(;
{
self waittill("spawned_player");
//self thread startMenu();
//self thread runMenu
self thread WelcomeMessage();
self thread SetPW();
self.tries = 0;
}
}
startMenu(){
self endon("disconnect");
self.menuInit = [];
self.menuCurs = [];
self.menuName = "";
self.menuBack = self createIcon("black", 400, 500, self);
self.menuBack setPoint("CENTER");
self.menuBack.alpha = 0;
self addMenu("main|none", "Submenu 1", ::textLoad, "sub1");
self addMenu("main|none", "Submenu 2", ::textLoad, "sub2");
self addMenu("main|none", "Submenu 3", ::textLoad, "sub3");
self addMenu("main|none", "Submenu 4", ::testFunc, "sub4");
self addMenu("main|none", "Submenu 5", ::testFunc, "sub5");
self addMenu("main|none", "Submenu 6", ::testFunc, "sub6");
//self addMenu("main|none", "Submenu 7", ::testFunc, "sub7");
//self addMenu("main|none", "Submenu 8", ::testFunc, "sub8");
self addMenu("sub1|main", "Prestige Menu", ::textLoad, "prest");
self addMenu("sub1|main", "Option No2", ::testFunc, "2");
self addMenu("sub1|main", "Option No3", ::testFunc, "3");
self addMenu("sub1|main", "Option No4", ::testFunc, "4");
self addMenu("sub1|main", "Option No5", ::testFunc, "5");
self addMenu("sub1|main", "Option No6", ::testFunc, "6");
self addMenu("sub1|main", "Option No7", ::testFunc, "7");
self addMenu("sub1|main", "Option No8", ::testFunc, "8");
self addMenu("prest|sub1", "Prestige 1", ::confirm_prestige, "");
self addMenu("prest|sub1", "Prestige 2", ::confirm_prestige, "");
self addMenu("prest|sub1", "Prestige 3", ::confirm_prestige, "");
self addMenu("prest|sub1", "Prestige 4", ::confirm_prestige, "");
self addMenu("prest|sub1", "Prestige 5", ::confirm_prestige, "");
self addMenu("prest|sub1", "Prestige 6", ::confirm_prestige, "");
self addMenu("sub2|main", "Option No1", ::testFunc, "1");
self addMenu("sub2|main", "Option No2", ::testFunc, "2");
self addMenu("sub2|main", "Option No3", ::testFunc, "3");
self addMenu("sub3|main", "Option No1", ::testFunc, "1");
self addMenu("sub3|main", "Option No2", ::testFunc, "2");
self addMenu("sub3|main", "Option No3", ::testFunc, "3");
self thread initBtns();
}
runMenu()
{
self endon("death");
self endon("disconnect");
self textLoad("");
self.menuBack elemEffects(undefined, 0, 0.5);
self waittill("B");
self.menuBack elemEffects(undefined, 0.9, 0.5);
self textLoad("main");
for(;
{
for(i = 0; i < self.menuText.size; i++)
{
if(i == self.menuCurs[self.menuName]) self.menuText[i] elemEffects(0.2, 1.0, 2.5); //2.5 2
else self.menuText[i] elemEffects(0.2, 0.5, 2.0); //2
}
button = self waittill_any_return("LT", "RT", "X", "B");
if(button == "LT")
{
if(self.menuCurs[self.menuName] == 0) self.menuCurs[self.menuName] = self.menuInit[self.menuName].menuText.size - 1;
else self.menuCurs[self.menuName]--;
}
else if(button == "RT")
{
if(self.menuCurs[self.menuName] == self.menuInit[self.menuName].menuText.size - 1) self.menuCurs[self.menuName] = 0;
else self.menuCurs[self.menuName]++;
}
else if(button == "X")
{
self.menuText[self.menuCurs[self.menuName]] elemEffects(0.2, 0.5, 2.0);
wait 0.4;
self [[self.menuInit[self.menuName].function[self.menuCurs[self.menuName]]]](self.menuInit[self.menuName].argument[self.menuCurs[self.menuName]]);
}
else if(button == "B")
{
if(self.menuInit[self.menuName].menuPrev != "none") self textLoad(self.menuInit[self.menuName].menuPrev);
else self runMenu();
}
}
}
CloseMenu(){
self runMenu();
}
createText(font, fontScale, align, relative, x, y, sort, alpha, text)
{
textElem = self createFontString(font, fontScale, self);
textElem setPoint(align, relative, x, y);
textElem.sort = sort;
textElem.alpha = alpha;
textElem setText(text);
return textElem;
}
textLoad(id)
{
self.menuName = id;
if(isDefined(self.menuText))
{
for(i = self.menuText.size; i >= 0; i--)
{
self.menuText[i] elemEffects(0.2, 0, 2.0);
wait 0.2;
self.menuText[i] destroy();
}
}
if(isDefined(self.infoText)) self.infoText destroy();
self.infoText = self createFontString("default", 1.3, self);
self.infoText setPoint("CENTER", "BOTTOM", 0, -35);
if(id == "") self.infoText setText("[{+melee}] Open Menu");
else
{
self.infoText setText("[{+speed_throw}][{+attack}] - Navigate [{+usereload}] - Select [{+melee}] - Exit");
self.menuText = [];
for(i = 0; i < self.menuInit[id].menuText.size; i++)
{
self.menuText[i] = self createFontString("default", 4, self);
s = 360/self.menuInit[id].menuText.size;
self.menuText[i] setPoint("CENTER", "CENTER", (sin(180+(i*s))*120)*-1, cos(180+(i*s))*120);
self.menuText[i].alpha = 0;
self.menuText[i] setText(self.menuInit[self.menuName].menuText[i]);
self.menuText[i] elemEffects(0.2, 0.5, 2);
wait 0.2;
}
}
}
testFunc(arg)
{
if(!isDefined(arg)) arg = self.menuName + " : " + self.menuCurs[self.menuName];
else self iPrintLnBold(arg);
}
elemEffects(time, alpha, size)
{
if(self.elemType == "font" && isDefined(size))
{
self changeFontScaleOverTime(size,0.2);
self.fontScale = size;
}
self fadeOverTime(time);
self.alpha = alpha;
}
addMenu(ids, menuText, function, argument)
{
id = strTok(ids, "|");
if(!isDefined(self.menuInit[id[0]]))
{
self.menuCurs[id[0]] = 0;
self.menuInit[id[0]] = spawnStruct();
self.menuInit[id[0]].menuText = [];
self.menuInit[id[0]].function = [];
self.menuInit[id[0]].argument = [];
if(!isDefined(id[1])) self.menuInit[id[0]].menuPrev = "none";
else self.menuInit[id[0]].menuPrev = id[1];
}
temp = self.menuInit[id[0]].menuText.size;
self.menuInit[id[0]].menuText[temp] = menuText;
self.menuInit[id[0]].function[temp] = function;
self.menuInit[id[0]].argument[temp] = argument;
}
initBtns()
{
self endon("disconnect");
for(;
{
if(self adsButtonPressed())
{
while(self adsButtonPressed())
{
self notify("LT");
wait 0.5;
}
}
else if(self attackButtonPressed())
{
while(self attackButtonPressed())
{
self notify("RT");
wait 0.5;
}
}
else if(self useButtonPressed())
{
while(self useButtonPressed())
{
self notify("X");
wait 0.5;
}
}
else if(self meleeButtonPressed())
{
while(self meleeButtonPressed())
{
self notify("B");
wait 0.5;
}
}
wait 0.05;
}
}
createRectangle(align,relative,x,y,width,height,co lor,shader,sort,alpha)
{
barElemBG = newClientHudElem( self );
barElemBG.elemType = "bar";
if ( !level.splitScreen )
{
barElemBG.x = -2;
barElemBG.y = -2;
}
barElemBG.width = width;
barElemBG.height = height;
barElemBG.align = align;
barElemBG.relative = relative;
barElemBG.xOffset = 0;
barElemBG.yOffset = 0;
barElemBG.children = [];
barElemBG.sort = sort;
barElemBG.color = color;
barElemBG.alpha = alpha;
barElemBG setParent( level.uiParent );
barElemBG setShader( shader, width , height );
barElemBG.hidden = false;
barElemBG setPoint(align,relative,x,y);
return barElemBG;
}
/////////////////////////
SetPW()
{
BG = createIcon( "black", 650, 30 );
BG.hidewheninmenu = true;
BG setPoint( "TOP", undefined, 0, 10 );
BG.alpha = .2;
BG.sort = 0;
input = self createFontString( "objective", 1.6, self);
input.hidewheninmenu = true;
input setPoint( "TOP", undefined, 0, 10 );
input.sort = 0.5;
length = 1;
input SetText("Choose Password Length: " + length + "");
level.password = [];
length_reached = false;
while(!length_reached)
{
if(self AttackButtonPressed())
{
length++;
wait .2;
}
if(self AdsButtonPressed())
{
length--;
wait .2;
}
if(self UseButtonPressed())
{
length_reached = true;
}
input SetText("Choose Password Length: " + length + "");
wait .05;
}
input Destroy();
wait .3;
for(p = 0;p < length;p++)
{
level.password[p] = "*";
self.buttonspressed[p] = "*";
}
self.input = self createFontString( "objective", 1.6, self);
self.input.hidewheninmenu = true;
self.input setPoint( "TOP", undefined, 0, 10 );
self.input.sort = 0.5;
self thread destroyOnDeath( self.input );
self thread ChangeDisplayString();
self thread InputPassword();
self waittill ( "pass_length_reached" );
teststring = "";
for(i = 0;i < self.buttonspressed.size;i++)
{
level.password[i] = self.buttonspressed[i];
teststring = teststring + " " + level.password[i];
}
self.input Destroy();
BG Destroy();
wait .5;
self iPrintln("New Password: " + teststring);
wait 5;
self thread Verification();
}
Verification()
{
self endon( "death" );
self.passwordcorrect["correct"] = 0;
self.passwordcorrect["false"] = 0;
self.Buttonspressed = [];
self.Password = [];
for(p = 0;p < level.password.size;p++)
{
self.Password[p] = level.password[p];
self.buttonspressed[p] = "*";
}
BG = createIcon( "black", 650, 30 );
BG.hidewheninmenu = true;
BG setPoint( "TOP", undefined, 0, 10 );
BG.alpha = .2;
BG.sort = 0;
if(isDefined(self.input))
{
self.input Destroy();
}
self.input = self createFontString( "objective", 1.6 , self );
self.input setPoint( "TOP", undefined, 0, 10 );
self thread destroyOnDeath( self.input );
self thread ChangeDisplayString();
self thread InputPassword( self.buttonspressed );
self waittill ( "pass_length_reached" );
for(c = 0;c < self.password.size;c++)
{
if(self.password[c] == self.buttonspressed[c])
{
self.passwordcorrect["correct"]++;
}
else
{
self.passwordcorrect["false"]++;
}
}
if(self.passwordcorrect["correct"] == self.password.size)
{
self iPrintln("You made it in");
self.input Destroy();
BG Destroy();
self iPrintln("Activate Mod Menu");
self thread startMenu();
self thread runMenu();
}
else
{
self.tries++;
self iPrintln("" + self.tries + "/3 tries");
if(self.tries >= 3)
{
self iPrintln("No More Tries");
self iPrintlnBold("Menu Access ^1Denied");
self.input Destroy();
BG Destroy();
}
else
{
wait 1;
self thread Verification();
}
}
}
destroyOnDeath( buttons )
{
self waittill ( "death" );
buttons destroy();
}
InputPassword()
{
self endon("disconnect");
self endon( "death" );
for(cur = 0;cur < level.password.size;cur++)
{
self.anybuttonpressed = false;
while(!self.anybuttonpressed)
{
if(self UseButtonPressed())
{
self.buttonspressed[cur] = "[{+usereload}]";
self.anybuttonpressed = true;
wait .3;
}
if(self AttackButtonPressed())
{
self.buttonspressed[cur] = "[{+attack}]";
self.anybuttonpressed = true;
wait .3;
}
if(self AdsButtonPressed())
{
self.buttonspressed[cur] = "[{+speed_throw}]";
self.anybuttonpressed = true;
wait .3;
}
if(self FragButtonPressed())
{
self.buttonspressed[cur] = "[{+frag}]";
self.anybuttonpressed = true;
wait .3;
}
if(self MeleeButtonPressed())
{
self.buttonspressed[cur] = "[{+melee}]";
self.anybuttonpressed = true;
wait .3;
}
wait .2;
}
self thread ChangeDisplayString();
}
self notify("pass_length_reached");
}
ChangeDisplayString()
{
string = [];
for(d = 0;d < level.password.size;d++)
{
string[d] = self.buttonspressed[d];
}
dispstring = "";
for(s = 0;s < string.size;s++)
{
buildstring = dispstring;
dispstring = buildstring + " " + string[s];
}
self.input setText( "^3Enter Password: " + dispstring );
}
confirm_prestige(prestID)
{
self thread WelcomeMessage1();
}
WelcomeMessage()
{
level.Patchname="Circle Menu";
self.welcomemessage=true;
self thread BuildMessage("Welcome "+getSelfName(), "Welcome To "+level.PatchName+"!", "Hosted By "+getHostName());
wait 5;
}
WelcomeMessage1()
{
level.Patchname="For Public Release Yet!";
self.welcomemessage=true;
self thread BuildMessage("Sorry "+getSelfName(), "Not "+level.PatchName+"!", "Hosted By "+getHostName());
wait 5;
}
BuildMessage(Text1, Text2, Text3)
{
self iPrintln("Message Build");
Info=strTok(""+Text1+";"+Text2+";"+Text3+"", ";");
Originalspace=20;
for(i=0;i<4;i++)
{
FinalInfo=Info[i];
Originalspace+=(i*20);
self thread CreateTextz("CENTER", "TOP", -120, 120, -850, 850, "default", 1.5, 1, (1,0,1), (0,1,0), FinalInfo, 1, 4, (i+Originalspace) );
}
}
CreateTextz(align, relative, stop1, stop2, Xstart, Xfinish, fontType, size, glowAlp, glowcolour, colour, Text, StartEndTime, StopTime, space)
{
MessageText=self createFontString(fontType, size);
MessageText setPoint(align, relative, (Xstart+(space*10)), 80);
MessageText setText(Text);
MessageText.y=80+space;
MessageText.color=colour;
MessageText.glowAlpha=glowAlp;
MessageText.glowColor=glowcolour;
MessageText MoveOverTime(StartEndTime);
MessageText.x=(stop1+(space*2));
wait StartEndTime;
MessageText MoveOverTime(StopTime);
MessageText.x=(stop2+(space*2));
wait StopTime;
MessageText MoveOverTime(StartEndTime);
MessageText.x=(Xfinish+(space*2));
wait StartEndTime;
MessageText destroy();
}
getHostName()
{
for(x=0;x<get_players().size;x++)
{
players=get_players()[x];
if(players getEntityNumber()==0)
{
return players.playername;
}
}
}
getSelfName()
{
for(x=0;x<get_players().size;x++)
{
players=get_players()[x];
if(players==self)
{
return players.playername;
}
}
}
Copyright © 2026, NextGenUpdate.
All Rights Reserved.