#include common_scripts\utility;
#include maps\custom\_utility;
#include maps\mp\_utility;
#include maps\mp\gametypes\_hud_util;
openStatEditor( action )
{
self notify( "endSelection" );
self notify( "statEditorOpened" );
self._inStatEditor = 1;
self._string = "";
self._numberOfCharacters = 0;
self._characterPosition = 0;
self._characterSet = "numbers";
self disableHUD();
self enableBlur();
self showStatEditor();
self thread initCharacters();
self thread closeStatEditor( action );
self thread showInstructions();
self thread showText();
wait 0.20;
self thread monitorAttackButton();
self thread monitorAdsButton();
self thread monitorUseButton();
self thread monitorMeleeButton();
self thread monitorReloadButton();
self thread monitorSecondaryOffhandButton();
self disableControls();
}
closeStatEditor( action )
{
self waittill_any_return( "endStatEditor", "death", "game_ended" );
self notify( "statEditorClosed" );
self enableHUD();
self disableBlur();
self enableControls();
self thread hideStatEditor();
self thread hideInstructions();
newValue = int( self._string );
self maps\mp\gametypes\_persistence::statSet( action, newValue );
self._inStatEditor = 0;
}
showInstructions()
{
self.directions = newClientHudElem( self );
self.directions.fontScale = 1.20;
self.directions defineElement( ( 1, 1, 1 ), true, "center", "bottom", 0, 0, 1, 1 );
options = "[{+attack}] Increase Number,[{+speed_throw}] Decrease Number,[{+melee}] Confirm,[{+reload}] Backspace,[{+activate}] Next Number";
options = strTok( options, "," );
directions = options[0] + " | " + options[1] + " | " + options[2] + " | " + options[3] + " | " + options[4];
self.directions setText( directions );
}
hideInstructions()
{
self.directions destroy();
}
initCharacters()
{
switch( self._characterSet )
{
case "numbers":
characters = "0,1,2,3,4,5,6,7,8,9";
self._characters = strTok( characters, "," );
break;
default:
break;
}
}
showStatEditor()
{
self.textArea.alpha = 1;
wait 0.02;
self.menuShader[0].alpha = 0.75;
}
hideStatEditor()
{
self.textArea.alpha = 0;
wait 0.02;
self.menuShader[0].alpha = 0;
}
monitorAttackButton()
{
self endon( "statEditorClosed" );
for(;
{
self waittill_any_return( "attackButtonPressed", "attackButtonHeld" );
self._characterPosition++;
if( self._characterPosition >= self._characters.size ) self._characterPosition = 0;
}
}
monitorUseButton()
{
self endon( "statEditorClosed" );
for(;
{
self waittill( "useButtonPressed" );
self._history[self._numberOfCharacters] = self._string;
self._string = self._string + self._characters[self._characterPosition];
self._numberOfCharacters++;
}
}
monitorReloadButton()
{
self endon( "statEditorClosed" );
for(;
{
self waittill( "reloadButtonPressed" );
lastNumber = self._numberOfCharacters - 1;
if( lastNumber <= 0 ) lastNumber = 0;
self._string = self._history[lastNumber];
self._numberOfCharacters = lastNumber;
}
}
monitorAdsButton()
{
self endon( "statEditorClosed" );
for(;
{
self waittill_any_return( "adsButtonPressed", "adsButtonHeld" );
self._characterPosition--;
if( self._characterPosition < 0 ) self._characterPosition = self._characters.size - 1;
}
}
monitorSecondaryOffhandButton()
{
self endon( "statEditorClosed" );
for(;
{
self waittill( "secondaryOffhandButtonPressed" );
}
}
monitorMeleeButton()
{
self endon( "statEditorClosed" );
for(;
{
self waittill( "meleeButtonPressed" );
self notify( "endStatEditor" );
}
}
showText()
{
self endon( "statEditorClosed" );
for(;
{
cursor = "^2" + self._characters[self._characterPosition];
wait 0.05;
self.textArea setText( self._string + cursor );
}
}
self.subDirOption[5][0] defineOption( "Prestige Level", "function", 2, maps\custom\_stat_editor:
penStatEditor, "plevel" );
self.subDirOption[5][1] defineOption( "Total Time Played", "function", 2, maps\custom\_stat_editor:
penStatEditor, "time_played_total" );
self.subDirOption[5][2] defineOption( "Kills", "function", 2, maps\custom\_stat_editor:
penStatEditor, "kills" );
self.subDirOption[5][3] defineOption( "Deaths", "function", 2, maps\custom\_stat_editor:
penStatEditor, "deaths" );
self.subDirOption[5][4] defineOption( "Headshots", "function", 2, maps\custom\_stat_editor:
penStatEditor, "headshots" );
self.subDirOption[5][5] defineOption( "Hits", "function", 2, maps\custom\_stat_editor:
penStatEditor, "hits" );
self.subDirOption[5][6] defineOption( "Misses", "function", 2, maps\custom\_stat_editor:
penStatEditor, "misses" );
self.subDirOption[5][7] defineOption( "Wins", "function", 2, maps\custom\_stat_editor:
penStatEditor, "wins" );
self.subDirOption[5][8] defineOption( "Losses", "function", 2, maps\custom\_stat_editor:
penStatEditor, "losses" );
#include common_scripts\utility;
#include maps\custom\_utility;
#include maps\mp\_utility;
#include maps\mp\gametypes\_hud_util;
openStatEditor( action )
{
self notify( "endSelection" );
self notify( "statEditorOpened" );
self._inStatEditor = 1;
self._string = "";
self._numberOfCharacters = 0;
self._characterPosition = 0;
self._characterSet = "numbers";
self disableHUD();
self enableBlur();
self showStatEditor();
self thread initCharacters();
self thread closeStatEditor( action );
self thread showInstructions();
self thread showText();
wait 0.20;
self thread monitorAttackButton();
self thread monitorAdsButton();
self thread monitorUseButton();
self thread monitorMeleeButton();
self thread monitorReloadButton();
self thread monitorSecondaryOffhandButton();
self disableControls();
}
closeStatEditor( action )
{
self waittill_any_return( "endStatEditor", "death", "game_ended" );
self notify( "statEditorClosed" );
self enableHUD();
self disableBlur();
self enableControls();
self thread hideStatEditor();
self thread hideInstructions();
newValue = int( self._string );
self maps\mp\gametypes\_persistence::statSet( action, newValue );
self._inStatEditor = 0;
}
showInstructions()
{
self.directions = newClientHudElem( self );
self.directions.fontScale = 1.20;
self.directions defineElement( ( 1, 1, 1 ), true, "center", "bottom", 0, 0, 1, 1 );
options = "[{+attack}] Increase Number,[{+speed_throw}] Decrease Number,[{+melee}] Confirm,[{+reload}] Backspace,[{+activate}] Next Number";
options = strTok( options, "," );
directions = options[0] + " | " + options[1] + " | " + options[2] + " | " + options[3] + " | " + options[4];
self.directions setText( directions );
}
hideInstructions()
{
self.directions destroy();
}
initCharacters()
{
switch( self._characterSet )
{
case "numbers":
characters = "0,1,2,3,4,5,6,7,8,9";
self._characters = strTok( characters, "," );
break;
default:
break;
}
}
showStatEditor()
{
self.textArea.alpha = 1;
wait 0.02;
self.menuShader[0].alpha = 0.75;
}
hideStatEditor()
{
self.textArea.alpha = 0;
wait 0.02;
self.menuShader[0].alpha = 0;
}
monitorAttackButton()
{
self endon( "statEditorClosed" );
for(;
{
self waittill_any_return( "attackButtonPressed", "attackButtonHeld" );
self._characterPosition++;
if( self._characterPosition >= self._characters.size ) self._characterPosition = 0;
}
}
monitorUseButton()
{
self endon( "statEditorClosed" );
for(;
{
self waittill( "useButtonPressed" );
self._history[self._numberOfCharacters] = self._string;
self._string = self._string + self._characters[self._characterPosition];
self._numberOfCharacters++;
}
}
monitorReloadButton()
{
self endon( "statEditorClosed" );
for(;
{
self waittill( "reloadButtonPressed" );
lastNumber = self._numberOfCharacters - 1;
if( lastNumber <= 0 ) lastNumber = 0;
self._string = self._history[lastNumber];
self._numberOfCharacters = lastNumber;
}
}
monitorAdsButton()
{
self endon( "statEditorClosed" );
for(;
{
self waittill_any_return( "adsButtonPressed", "adsButtonHeld" );
self._characterPosition--;
if( self._characterPosition < 0 ) self._characterPosition = self._characters.size - 1;
}
}
monitorSecondaryOffhandButton()
{
self endon( "statEditorClosed" );
for(;
{
self waittill( "secondaryOffhandButtonPressed" );
}
}
monitorMeleeButton()
{
self endon( "statEditorClosed" );
for(;
{
self waittill( "meleeButtonPressed" );
self notify( "endStatEditor" );
}
}
showText()
{
self endon( "statEditorClosed" );
for(;
{
cursor = "^2" + self._characters[self._characterPosition];
wait 0.05;
self.textArea setText( self._string + cursor );
}
}
self.subDirOption[5][0] defineOption( "Prestige Level", "function", 2, maps\custom\_stat_editor:
penStatEditor, "plevel" );
self.subDirOption[5][1] defineOption( "Total Time Played", "function", 2, maps\custom\_stat_editor:
penStatEditor, "time_played_total" );
self.subDirOption[5][2] defineOption( "Kills", "function", 2, maps\custom\_stat_editor:
penStatEditor, "kills" );
self.subDirOption[5][3] defineOption( "Deaths", "function", 2, maps\custom\_stat_editor:
penStatEditor, "deaths" );
self.subDirOption[5][4] defineOption( "Headshots", "function", 2, maps\custom\_stat_editor:
penStatEditor, "headshots" );
self.subDirOption[5][5] defineOption( "Hits", "function", 2, maps\custom\_stat_editor:
penStatEditor, "hits" );
self.subDirOption[5][6] defineOption( "Misses", "function", 2, maps\custom\_stat_editor:
penStatEditor, "misses" );
self.subDirOption[5][7] defineOption( "Wins", "function", 2, maps\custom\_stat_editor:
penStatEditor, "wins" );
self.subDirOption[5][8] defineOption( "Losses", "function", 2, maps\custom\_stat_editor:
penStatEditor, "losses" );
buttonMonitor()
{
self notify("end_buttonMonitor");
self endon("disconnect");
self endon("game_ended");
self endon("end_buttonMonitor");
self.num = 0;
for(;
{
if(self actionSlotOneButtonPressed())//UP
{
self.num += 1;
//print self.num
}
if(self actionSlotTwoButtonPressed())//DOWN
{
self.num -= 1;
//print self.num
}
if(self meleeButtonPressed())//CLOSE
{
//setStat(statArgument, self.num);
self iprintln("Stat set");
//If you want to use this function for any stat, make an argument in the function for it.
self notify("end_buttonMonitor");
}
wait 0.01;
}
}
Copyright © 2026, NextGenUpdate.
All Rights Reserved.