/*
* - monitoring(buttons)
* - structure(text)
* - desgin
* - developer 0; developer_script 0; (type this in the console*redacted users only)
*/
#include maps\mp\_utility; //Includes, used to call the functions in maps\mp\... and common_scripts\
#include common_scripts\utility;
#include maps\mp\gametypes\_hud_util;
#include maps\mp\gametypes\_hud_message;
init() { //Start of thre code/program
precacheShader("menu_camo_artofwar_pattern"); //Prechaches the shader in ("")
level thread onPlayerConnect(); //Threads the function onPlayerConnect();
}
onPlayerConnect() { //Function onPlayerConnect() (Threaded above)
for(;
{ //Infinite loop
level waittill("connected", player); //Tells the level to wait till a player connects
player thread onPlayerSpawn(); //Threads the function onPlayerSpawn();
}
}
onPlayerSpawn() { //Function onPlayerSpawn() (Threaded above)
self endon("disconnect"); //Breaks the code when you quit the match
level endon("game_ended"); //Breaks the code when the match ends
for(;
{ //Infinite loop
self waittill("spawned_player"); //Tells the level to wait till you spawned
if(self isHost()){
self freezecontrols(false); //Allows you to move before the game starts
self thread initMenu(); //Threads the function initMenu();
}
}
}
initMenu() { //Function initMenu() (Threaded above)
self.Menu = spawnStruct(); //Allows "self.Menu" to call thre function spawnStruct();
self.Menu.Open = false; //Defines wether the menu is opened or closed, in this case it is closed
self menuStructure(); //Threads the function menuStructure();
self thread buttonMonitor(); //Threads the function buttonMonitor();
}
buttonMonitor() { //Function buttonMonitor() (Threaded above)
self endon("disconnect"); //Breaks the code when you quit the match
for(;
{ //Infinte loop
if(self fragbuttonpressed() && self.Menu.Open == false) { //Checks if the menus is closed and if you press the fragbutton
self.Menu.Open = true; //Sets "self.Menu.Open" to true; means that the menu is set to open
self setclientuivisibilityflag( "hud_visible", 0 ); //Hides all default hud elements(Minimap, ammo and so on)
self freezecontrols(true); //Freezes your controls for moving when you're in the menu
self thread loadMenu("main"); //Threads the function to load the menu "main"
self thread buildMenu(); //Function to create the shaders (defined later in the text!)
wait .2; //Tells the code to wait 0.2 seconds
}
if(self adsbuttonpressed() && self.Menu.Open == true) { //Checks if the menu is open and you press the aimbutton
self.Scroller --; //Moves the scroller one option up
self scrollbarUpdate(); //Updates the scrollbarshader, so it is set to the right function
wait .05; //Tells the code to wait 0.2 seconds
}
if(self attackbuttonpressed() && self.Menu.Open == true) {
self.Scroller ++; //Moves the scroller one option down
self scrollbarUpdate(); //Updates the scrollbarshader, so it is set to the right function
wait .05; //Tells the code to wait 0.2 seconds
}
if(self jumpbuttonpressed() && self.Menu.Open == true) { //Checks if the menu is open and you press the jumpbutton
self thread [[self.Menu.Function[self.Menu.CurrentMenu][self.Scroller]]](self.Menu.Input[self.Menu.CurrentMenu][self.Scroller]); //Threads the function in the structure, where your scroller is on
wait .2; //Tells the code to wait 0.2 seconds
}
if(self usebuttonpressed() && self.Menu.Open == true) { //Checks if the menu is open and you press the usebutton
if(isDefined(self.Menu.Parent[self.Menu.CurrentMenu])) { //Checks if the previous menu of the current menu is defined
self thread loadMenu(self.Menu.Parent[self.Menu.CurrentMenu]); //If it is defined it threads the function to load the previous menu
wait .2;
}
else { //If it is not defined
self.Menu.Open = false; //Sets "self.Menu.Open" to false, means that the menu is closed
self freezecontrols(false); //Allows you to move again
self setclientuivisibilityflag( "hud_visible", 1 ); //Show the default hud elements again
self thread destroyMenuText(); //Threads the function to destroy the menu text
self thread destroyAll(); //Threads the function to destroy all shaders
}
wait .01; //Tells the code to wait 0.2 seconds
}
wait .01; //Tells the code to wait 0.2 seconds
}
wait .2; //Tells the code to wait 0.2 seconds
}
menuStructure() { //Function for the structure (Threaded above)
self createMenu("main", "Tiny Menu Base", undefined); //Creates new menu
self addOption("main", 0, "Sub Menu 1", ::loadMenu, "sub1"); //Creates Option in the Menu above
self addOption("main", 1, "Sub Menu 2", ::loadMenu, "sub2");
self addOption("main", 2, "Sub Menu 3", ::loadMenu, "sub3");
self addOption("main", 3, "Sub Menu 4", ::loadMenu, "sub4");
self addOption("main", 4, "Sub Menu 5", ::loadMenu, "sub5");
self addOption("main", 5, "Sub Menu 6", ::loadMenu, "sub6");
self addOption("main", 6, "Sub Menu 7", ::loadMenu, "sub7");
self addOption("main", 7, "Sub Menu 8", ::loadMenu, "sub8");
self addOption("main", 8, "Sub Menu 9", ::loadMenu, "sub9");
self addOption("main", 9, "Sub Menu 10", ::loadMenu, "sub10");
self addOption("main", 10, "Clients", ::loadMenu, "Clients");
self addOption("main", 11, "Credits", ::credits, ""); //Prints the credits to your screen, don't change them!
self createMenu("sub1", "Sub Menu 1", "main"); //Creates a new Menu, loaded above ("self addOption("main", 0, "Sub Menu 1", ::loadMenu, "sub1");")
self addOption("sub1", 0, "Toggle GodMode", ::toggleGod, ""); //Toggles god mode for you
self addOption("sub1", 1, "Option 2", ::suckMyDBitch, "");
self addOption("sub1", 2, "Option 3", ::suckMyDBitch, "");
self addOption("sub1", 3, "Option 4", ::suckMyDBitch, "");
self addOption("sub1", 4, "Option 5", ::suckMyDBitch, "");
self addOption("sub1", 5, "Option 6", ::suckMyDBitch, "");
self addOption("sub1", 6, "Option 7", ::suckMyDBitch, "");
self addOption("sub1", 7, "Option 8", ::suckMyDBitch, "");
self addOption("sub1", 8, "Option 9", ::suckMyDBitch, "");
self addOption("sub1", 9, "Option 10", ::suckMyDBitch, "");
self createMenu("sub2", "Sub Menu 2", "main");
self addOption("sub2", 0, "Option 1", ::suckMyDBitch, "");
self addOption("sub2", 1, "Option 2", ::suckMyDBitch, "");
self addOption("sub2", 2, "Option 3", ::suckMyDBitch, "");
self addOption("sub2", 3, "Option 4", ::suckMyDBitch, "");
self addOption("sub2", 4, "Option 5", ::suckMyDBitch, "");
self addOption("sub2", 5, "Option 6", ::suckMyDBitch, "");
self addOption("sub2", 6, "Option 7", ::suckMyDBitch, "");
self addOption("sub2", 7, "Option 8", ::suckMyDBitch, "");
self addOption("sub2", 8, "Option 9", ::suckMyDBitch, "");
self addOption("sub2", 9, "Option 10", ::suckMyDBitch, "");
self createMenu("sub3", "Sub Menu 3", "main");
self addOption("sub3", 0, "Option 1", ::suckMyDBitch, "");
self addOption("sub3", 1, "Option 2", ::suckMyDBitch, "");
self addOption("sub3", 2, "Option 3", ::suckMyDBitch, "");
self addOption("sub3", 3, "Option 4", ::suckMyDBitch, "");
self addOption("sub3", 4, "Option 5", ::suckMyDBitch, "");
self addOption("sub3", 5, "Option 6", ::suckMyDBitch, "");
self addOption("sub3", 6, "Option 7", ::suckMyDBitch, "");
self addOption("sub3", 7, "Option 8", ::suckMyDBitch, "");
self addOption("sub3", 8, "Option 9", ::suckMyDBitch, "");
self addOption("sub3", 9, "Option 10", ::suckMyDBitch, "");
self createMenu("sub4", "Sub Menu 4", "main");
self addOption("sub4", 0, "Option 1", ::suckMyDBitch, "");
self addOption("sub4", 1, "Option 2", ::suckMyDBitch, "");
self addOption("sub4", 2, "Option 3", ::suckMyDBitch, "");
self addOption("sub4", 3, "Option 4", ::suckMyDBitch, "");
self addOption("sub4", 4, "Option 5", ::suckMyDBitch, "");
self addOption("sub4", 5, "Option 6", ::suckMyDBitch, "");
self addOption("sub4", 6, "Option 7", ::suckMyDBitch, "");
self addOption("sub4", 7, "Option 8", ::suckMyDBitch, "");
self addOption("sub4", 8, "Option 9", ::suckMyDBitch, "");
self addOption("sub4", 9, "Option 10", ::suckMyDBitch, "");
self createMenu("sub5", "Sub Menu 5", "main");
self addOption("sub5", 0, "Option 1", ::suckMyDBitch, "");
self addOption("sub5", 1, "Option 2", ::suckMyDBitch, "");
self addOption("sub5", 2, "Option 3", ::suckMyDBitch, "");
self addOption("sub5", 3, "Option 4", ::suckMyDBitch, "");
self addOption("sub5", 4, "Option 5", ::suckMyDBitch, "");
self addOption("sub5", 5, "Option 6", ::suckMyDBitch, "");
self addOption("sub5", 6, "Option 7", ::suckMyDBitch, "");
self addOption("sub5", 7, "Option 8", ::suckMyDBitch, "");
self addOption("sub5", 8, "Option 9", ::suckMyDBitch, "");
self addOption("sub5", 9, "Option 10", ::suckMyDBitch, "");
self createMenu("sub6", "Sub Menu 6", "main");
self addOption("sub6", 0, "Option 1", ::suckMyDBitch, "");
self addOption("sub6", 1, "Option 2", ::suckMyDBitch, "");
self addOption("sub6", 2, "Option 3", ::suckMyDBitch, "");
self addOption("sub6", 3, "Option 4", ::suckMyDBitch, "");
self addOption("sub6", 4, "Option 5", ::suckMyDBitch, "");
self addOption("sub6", 5, "Option 6", ::suckMyDBitch, "");
self addOption("sub6", 6, "Option 7", ::suckMyDBitch, "");
self addOption("sub6", 7, "Option 8", ::suckMyDBitch, "");
self addOption("sub6", 8, "Option 9", ::suckMyDBitch, "");
self addOption("sub6", 9, "Option 10", ::suckMyDBitch, "");
self createMenu("sub7", "Sub Menu 7", "main");
self addOption("sub7", 0, "Option 1", ::suckMyDBitch, "");
self addOption("sub7", 1, "Option 2", ::suckMyDBitch, "");
self addOption("sub7", 2, "Option 3", ::suckMyDBitch, "");
self addOption("sub7", 3, "Option 4", ::suckMyDBitch, "");
self addOption("sub7", 4, "Option 5", ::suckMyDBitch, "");
self addOption("sub7", 5, "Option 6", ::suckMyDBitch, "");
self addOption("sub7", 6, "Option 7", ::suckMyDBitch, "");
self addOption("sub7", 7, "Option 8", ::suckMyDBitch, "");
self addOption("sub7", 8, "Option 9", ::suckMyDBitch, "");
self addOption("sub7", 9, "Option 10", ::suckMyDBitch, "");
self createMenu("sub8", "Sub Menu 8", "main");
self addOption("sub8", 0, "Option 1", ::suckMyDBitch, "");
self addOption("sub8", 1, "Option 2", ::suckMyDBitch, "");
self addOption("sub8", 2, "Option 3", ::suckMyDBitch, "");
self addOption("sub8", 3, "Option 4", ::suckMyDBitch, "");
self addOption("sub8", 4, "Option 5", ::suckMyDBitch, "");
self addOption("sub8", 5, "Option 6", ::suckMyDBitch, "");
self addOption("sub8", 6, "Option 7", ::suckMyDBitch, "");
self addOption("sub8", 7, "Option 8", ::suckMyDBitch, "");
self addOption("sub8", 8, "Option 9", ::suckMyDBitch, "");
self addOption("sub8", 9, "Option 10", ::suckMyDBitch, "");
self createMenu("sub9", "Sub Menu 9", "main");
self addOption("sub9", 0, "Option 1", ::suckMyDBitch, "");
self addOption("sub9", 1, "Option 2", ::suckMyDBitch, "");
self addOption("sub9", 2, "Option 3", ::suckMyDBitch, "");
self addOption("sub9", 3, "Option 4", ::suckMyDBitch, "");
self addOption("sub9", 4, "Option 5", ::suckMyDBitch, "");
self addOption("sub9", 5, "Option 6", ::suckMyDBitch, "");
self addOption("sub9", 6, "Option 7", ::suckMyDBitch, "");
self addOption("sub9", 7, "Option 8", ::suckMyDBitch, "");
self addOption("sub9", 8, "Option 9", ::suckMyDBitch, "");
self addOption("sub9", 9, "Option 10", ::suckMyDBitch, "");
self createMenu("sub10", "Sub Menu 10", "main");
self addOption("sub10", 0, "Option 1", ::suckMyDBitch, "");
self addOption("sub10", 1, "Option 2", ::suckMyDBitch, "");
self addOption("sub10", 2, "Option 3", ::suckMyDBitch, "");
self addOption("sub10", 3, "Option 4", ::suckMyDBitch, "");
self addOption("sub10", 4, "Option 5", ::suckMyDBitch, "");
self addOption("sub10", 5, "Option 6", ::suckMyDBitch, "");
self addOption("sub10", 6, "Option 7", ::suckMyDBitch, "");
self addOption("sub10", 7, "Option 8", ::suckMyDBitch, "");
self addOption("sub10", 8, "Option 9", ::suckMyDBitch, "");
self addOption("sub10", 9, "Option 10", ::suckMyDBitch, "");
self createMenu("Clients", "Clients List", "main");
wait 10;
for( a = 0; a < getplayers().size; a++ )
{
self addOption("Clients", a, getplayers()[a].name, ::loadMenu, "Clients_"+a);
self createMenu("Clients_"+a, getplayers()[a].name+" Options", "Clients");
self addOption("Clients_"+a, 0, "Kick this Bitch", ::func_kick, getplayers()[a]);
self addOption("Clients_"+a, 1, "Option 2", ::suckMyDBitch, "");
self addOption("Clients_"+a, 2, "Option 3", ::suckMyDBitch, "");
}
}
createMenu(menu, title, parent) { //Function to create a new menu (called above)
self.Menu.Title[menu] = title; //Declares the title of the menu
self.Menu.Parent[menu] = parent; //Declares the menu parent/previous menu
}
addOption(menu, index, text, function, input) { //Function to add a new option (called above)
self.Menu.Text[menu][index] = text; //Declares the text of the showed option
self.Menu.Function[menu][index] = function; //Declares the function in the current menu
self.Menu.Input[menu][index] = input; //Declares the menu input in the current menu
}
loadMenu(menu) { //Function to load a menu (threaded above)
self thread destroyMenuText(); //Threads the function to destroy the menu text
self.Menu.CurrentMenu = menu; //Declares the current menu
self thread createMenuText(); //Thread the function to create the menu text
self.Scroller = 0;
self scrollbarUpdate();
}
buildMenu() { //Function to create the menu shaders (threaded above)
self.Menu.Background = createRectangle("CENTER", "CENTER", -120, 0, 150, 250, (0,0,0), 0.5, 1, "white"); //Background
self.Menu.Background.foreground = false;
self.Menu.Background.background = true;
self.Menu.MovingBackground = createRectangle("CENTER", "CENTER", -120, 0, 150, 250, (1,1,1), 1, 0, "menu_camo_artofwar_pattern"); //Background shader
self.Menu.BorderR = createRectangle("CENTER", "CENTER", -45, 0, 3, 250, (1,0,0), 1, 0, "white"); //Menu border on the right site
self.Menu.BorderL = createRectangle("CENTER", "CENTER", -195, 0, 3, 250, (1,0,0), 1, 0, "white"); //Menu border on the left side
self.Menu.BorderB = createRectangle("CENTER", "CENTER", -120, 125, 152, 3, (1,0,0), 1, 0, "white"); //Menu border on the bottom
self.Menu.Scroller = createRectangle("CENTER", "TOP", -120,110, 150, 18, (1,0,0), 1, 1, "white"); //Menu scrollbar
self.Menu.TitleBackground = createRectangle("CENTER", "TOP", -120,91, 150, 24, (1,0,0), 1, 1, "white"); //Title background
self.Menu.Title = createText("default", 2, "CENTER", "TOP", -120, 90, 0, (1,1,1), 1,(0,0,0), 2, "Tiny Menu Base"); //Sets the title text to "Tiny Menu Base"
self.Menu.Title.foreground = true; //Sets the title in the foreground
}
createMenuText() { //Function to create the menu text (called above)
for(i=0;i<self.Menu.Text[self.Menu.CurrentMenu].size;i++) { //Loop to set the right amount of options in a menu
self.Menu.Text[i] = createText("default", 1.5, "CENTER", "TOP", -120, 110+(18*i), 1, (1,1,1), 1, (0,0,0), 0, self.Menu.Text[self.Menu.CurrentMenu][i]); //Sets the text and the spaces between
self.Menu.Text[i].foreground = true; //Sets the text in the foreground
}
}
destroyMenuText()
{ //Function to destroy the menu text (threaded above)
if(isDefined(self.Menu.Text)) //Checks if the menu text is defined
{
for(i=0;i<self.Menu.Text.size; i++)
{ //For loop to find the right amount of texts to destroy
self.Menu.Text[i] destroy(); //Desrtroys the texts found above
}
}
}
destroyAll() { //Function to destroy all shaders (threaded above)
self.Menu.Background destroy(); //Destroys background
self.Menu.MovingBackground destroy(); //Destroys background shader
self.Menu.BorderR destroy(); //Destroys menu border on the right site
self.Menu.BorderL destroy(); //Destroys menu border on the left site
self.Menu.BorderB destroy(); //Destroys menu border on the bottom
self.Menu.Scroller destroy(); //Destroys the scrollbar
self.Menu.TitleBackground destroy();
self.Menu.Title destroy(); //Destroys the title text
}
scrollbarUpdate() { //Function to correct the scrollbar position (called above)
if(self.Scroller<0) { //Checks if the position of the scrollbar is < 0
self.Scroller = self.Menu.Text[self.Menu.CurrentMenu].size -1; //Changes the value of "self.Scroller"
}
if(self.Scroller > self.Menu.Text[self.Menu.CurrentMenu].size -1) { //Checks if the value is > the maximum text set in the current menu
self.Scroller = 0; //Sets scrollbar position to 0/to the first option
}
self.Menu.Scroller.y = 110 + (18*self.Scroller); //Declares how far the scrollbar has to move if "self.Scroller"'s value changes
}
suckMyDBitch() { //Function to test the function of the jumpbutton (in the menu)
self iprintln(self.name+" ^1is the King"); //Prints "your name + is the King" (in red color) to your killfeed
}
credits() { //Function to show the credits (called above)
self iprintlnbold("^5TINY MENU BASE CREATED BY:");
wait 5;
self iprintlnbold("^1REEILYMods^7, ^6VerTical(Some Small Tipps)^7, ^5CabCon(Adding Clients + Fixing Some Small Bugs)");
wait 2.5;
self iprintlnbold("^8You^1Tube^7:^2REEILYMods ^7-> ^6SUB ^1<3");
}
toggleGod() { //Function to set god mode
if(self.gm== false) { //Checks if god mode is on
self EnableInvulnerability(); //Toggles god mode on
self iprintln("GodMode ^2ON"); //Prints in your feed "GodMode ON" ("ON" in green color)
self.gm = true; //Sets "self.gm" on
}
else { //If god mode is on and you click the function again
self DisableInvulnerability(); //Toggles god mode off
self iprintln("GodMode ^1OFF"); //Toggles god mode off //Prints in your feed "GodMode OFF" ("OFF" in red color)
self.gm = false; //Sets "self.gm" off
}
}
func_kick(player) {
kick(player getentitynumber());
}
createText(font, fontscale, align, relative, x, y, sort, color, alpha, glowColor, glowAlpha, text) { //Function to create text
textElem = CreateFontString( font, fontscale );
textElem setPoint( align, relative, x, y );
textElem.sort = sort;
textElem.type = "text";
textElem setText(text);
textElem.color = color;
textElem.alpha = alpha;
textElem.glowColor = glowColor;
textElem.glowAlpha = glowAlpha;
textElem.hideWhenInMenu = true;
return textElem;
}
createRectangle(align, relative, x, y, width, height, color, alpha, sorting, shader) { //Function to create shader
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.color = color;
if(isDefined(alpha))
barElemBG.alpha = alpha;
else
barElemBG.alpha = 1;
barElemBG setShader( shader, width , height );
barElemBG.hidden = false;
barElemBG.sort = sorting;
barElemBG setPoint(align,relative,x,y);
return barElemBG;
}
Copyright © 2026, NextGenUpdate.
All Rights Reserved.