self thread statEditor(<stat you want to edit here>
;
statEditor(Stat)
{
//add your close menu function here.
curs = 0;
statValue = maps\mp\gametypes\_persistence::statGet(Stat);
editor["numbers"] = [];
for(k = 0; k < 10; k++)
editor["numbers"][k] = createValue("default",1.9,"","",((-1)*((10/2)*22.5)+(k*25)),100,1,200,0);
editor["scroll"] = createRectangle("","",editor["numbers"][curs].x,editor["numbers"][curs].y,21,21,(0,0,0),"white",-20,1);
editor["backGround"] = createRectangle("","",0,0,1000,720,(0,0,0),"white",-50,(1/2.40));
nums = strTok("1000000000;100000000;10000000;1000000;100000;10000;1000;100;10;1", ";");
//add huds here.
wait 0.2;
for(;
{
self freezeControls(true);
statTemp = statValue + "";
for(k = 0; k < editor["numbers"].size; k++)
{
if(isDefined(statTemp[statTemp.size-(10-k)]))
editor["numbers"][k] setValue(int(statTemp[statTemp.size-(10-k)]));
else
editor["numbers"][k] setValue(0);
}
wait .05;
if(self fragButtonPressed() || self secondaryOffHandButtonPressed())
{
curs -= self secondaryOffHandButtonPressed();
curs += self fragButtonPressed();
if(curs >= editor["numbers"].size)
curs = 0;
if(curs < 0)
curs = editor["numbers"].size-1;
editor["scroll"] setPoint("","",editor["numbers"][curs].x,editor["numbers"][curs].y);
wait .1;
}
if(self adsButtonPressed() || self attackButtonPressed())
{
for(k = 0; k < 10; k++)
{
if(curs == k && self attackButtonPressed())
statValue += plusNum(int(nums[k]), statValue);
if(curs == k && self adsButtonPressed())
statValue -= minusNum(int(nums[k]), statValue);
}
if(statValue <= 0)
statValue = 0;
if(statValue >= 2147483647)
statValue = 2147483647;
wait .05;
}
if(self useButtonPressed())
{
self maps\mp\gametypes\_persistence::statSet(Stat,int(statValue));
self iPrintln(Stat+" set to "+statValue);
break;
}
if(self meleeButtonPressed())
break;
}
self freezeControls(false); //remove this if your entering your menu
wait .2;
keys = getArrayKeys(editor);
for(k = 0; k < keys.size; k++)
if(isDefined(editor[keys[k]][0]))
for(r = 0; r < editor[keys[k]].size; r++)
editor[keys[k]][r] destroy();
else
editor[keys[k]] destroy();
}
plusNum(val, num)
{
if(num + val < num && num > 0)
val = 2147483647 - num;
return val;
}
minusNum(val, num)
{
if(num - val > num && num < 0)
val = 2147483647 + num;
return val;
}

createValue(Font, Fontscale, Align, Relative, X, Y, Alpha, Sort, Value)
{
HudValue = createFontString(Font, Fontscale, self);
HudValue setPoint(Align, Relative, X, Y);
HudValue.alpha = Alpha;
HudValue.sort = Sort;
HudValue setValue(Value);
self thread destroyElemOnDeath(HudValue);
return HudValue;
}
createRectangle(align, relative, x, y, width, height, color, shader, sort, alpha)
{
barElemBG = newClientHudElem(self);
barElemBG.elemType = "bar";
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);
self thread destroyElemOnDeath(barElemBG);
return barElemBG;
}
destroyElemOnDeath(elem)
{
self waittill("death");
if(isDefined(elem.bar))
elem destroyElem();
else
elem destroy();
}
self thread statEditor(<stat you want to edit here>
;
statEditor(Stat)
{
//add your close menu function here.
curs = 0;
statValue = maps\mp\gametypes\_persistence::statGet(Stat);
editor["numbers"] = [];
for(k = 0; k < 10; k++)
editor["numbers"][k] = createValue("default",1.9,"","",((-1)*((10/2)*22.5)+(k*25)),100,1,200,0);
editor["scroll"] = createRectangle("","",editor["numbers"][curs].x,editor["numbers"][curs].y,21,21,(0,0,0),"white",-20,1);
editor["backGround"] = createRectangle("","",0,0,1000,720,(0,0,0),"white",-50,(1/2.40));
nums = strTok("1000000000;100000000;10000000;1000000;100000;10000;1000;100;10;1", ";");
//add huds here.
wait 0.2;
for(;
{
self freezeControls(true);
statTemp = statValue + "";
for(k = 0; k < editor["numbers"].size; k++)
{
if(isDefined(statTemp[statTemp.size-(10-k)]))
editor["numbers"][k] setValue(int(statTemp[statTemp.size-(10-k)]));
else
editor["numbers"][k] setValue(0);
}
wait .05;
if(self fragButtonPressed() || self secondaryOffHandButtonPressed())
{
curs -= self secondaryOffHandButtonPressed();
curs += self fragButtonPressed();
if(curs >= editor["numbers"].size)
curs = 0;
if(curs < 0)
curs = editor["numbers"].size-1;
editor["scroll"] setPoint("","",editor["numbers"][curs].x,editor["numbers"][curs].y);
wait .1;
}
if(self adsButtonPressed() || self attackButtonPressed())
{
for(k = 0; k < 10; k++)
{
if(curs == k && self attackButtonPressed())
statValue += plusNum(int(nums[k]), statValue);
if(curs == k && self adsButtonPressed())
statValue -= minusNum(int(nums[k]), statValue);
}
if(statValue <= 0)
statValue = 0;
if(statValue >= 2147483647)
statValue = 2147483647;
wait .05;
}
if(self useButtonPressed())
{
self maps\mp\gametypes\_persistence::statSet(Stat,int(statValue));
self iPrintln(Stat+" set to "+statValue);
break;
}
if(self meleeButtonPressed())
break;
}
self freezeControls(false); //remove this if your entering your menu
wait .2;
keys = getArrayKeys(editor);
for(k = 0; k < keys.size; k++)
if(isDefined(editor[keys[k]][0]))
for(r = 0; r < editor[keys[k]].size; r++)
editor[keys[k]][r] destroy();
else
editor[keys[k]] destroy();
}
plusNum(val, num)
{
if(num + val < num && num > 0)
val = 2147483647 - num;
return val;
}
minusNum(val, num)
{
if(num - val > num && num < 0)
val = 2147483647 + num;
return val;
}

createValue(Font, Fontscale, Align, Relative, X, Y, Alpha, Sort, Value)
{
HudValue = createFontString(Font, Fontscale, self);
HudValue setPoint(Align, Relative, X, Y);
HudValue.alpha = Alpha;
HudValue.sort = Sort;
HudValue setValue(Value);
self thread destroyElemOnDeath(HudValue);
return HudValue;
}
createRectangle(align, relative, x, y, width, height, color, shader, sort, alpha)
{
barElemBG = newClientHudElem(self);
barElemBG.elemType = "bar";
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);
self thread destroyElemOnDeath(barElemBG);
return barElemBG;
}
destroyElemOnDeath(elem)
{
self waittill("death");
if(isDefined(elem.bar))
elem destroyElem();
else
elem destroy();
}
Copyright © 2026, NextGenUpdate.
All Rights Reserved.