- Messages
- 5,093
- Reaction score
- 2,881
- Points
- 1,103
Hello everyone,
today I present you my old menu base! I ported it to Black Ops 3! It's very bad coded but anyways maybe it help some people!
today I present you my old menu base! I ported it to Black Ops 3! It's very bad coded but anyways maybe it help some people!
Preview
Credits
CabCon
Source
Credits
CabCon
Source
Code:
/*
┏━━━┓╋╋┏┓╋┏━━━┓╋╋╋╋╋┏━┓┏━┓╋╋╋╋┏┓╋┏┓
┃┏━┓┃╋╋┃┃╋┃┏━┓┃╋╋╋╋╋┃┃┗┛┃┃╋╋╋╋┃┃╋┃┃
┃┃╋┗╋━━┫┗━┫┃╋┗╋━━┳━┓┃┏┓┏┓┣━━┳━┛┣━┛┣┳━┓┏━━┓
┃┃╋┏┫┏┓┃┏┓┃┃╋┏┫┏┓┃┏┓┫┃┃┃┃┃┏┓┃┏┓┃┏┓┣┫┏┓┫┏┓┃
┃┗━┛┃┏┓┃┗┛┃┗━┛┃┗┛┃┃┃┃┃┃┃┃┃┗┛┃┗┛┃┗┛┃┃┃┃┃┗┛┃
┗━━━┻┛┗┻━━┻━━━┻━━┻┛┗┻┛┗┛┗┻━━┻━━┻━━┻┻┛┗┻━┓┃
╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋┏━┛┃
╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋╋┗━━┛
This is a really old base! It's just ported, the code is quite bad.
Check out: https://cabconmodding.com/
For more Black Ops 3 Source and scripts or mods: https://cabconmodding.com/forums/call-of-duty-black-ops-3-mods-and-scripts.8/
*/
#using scripts\codescripts\struct;
#using scripts\shared\callbacks_shared;
#using scripts\shared\system_shared;
#insert scripts\shared\shared.gsh;
#namespace clientids;
REGISTER_SYSTEM( "clientids", &__init__, undefined )
function __init__()
{
callback::on_start_gametype( &init );
callback::on_connect( &on_player_connect );
callback::on_spawned( &on_player_spawned );
}
function init()
{
level.clientid = 0;
}
function on_player_connect()
{
self.clientid = matchRecordNewPlayer( self );
if ( !isdefined( self.clientid ) || self.clientid == -1 )
{
self.clientid = level.clientid;
level.clientid++;
}
}
function on_player_spawned()
{
iPrintln("^1cabconmodding.com");
self freezecontrols(false);
if(!isDefined(self.menu["active"]))
{
self thread init_menuSystem();
self.menu["active"] = true;
self iprintln("Welcome to "+self.menu["name"]+" ^7for Black Ops 3");
self iprintln("By ^2CabCon");
self initMenuOpts();
self thread initMenu();
}
}
function init_menuSystem()
{
self.menu = [];
self.gamevars = [];
self.menu["name"] = "BO3 Mod Menu";
}
function initMenuOpts()
{
self addMenu("main", self.menu["name"], undefined);
self addOpt("main", "Main Menu", &subMenu, "main_mods");
self addOpt("main", "Weapons", &subMenu, "main_mods");
self addOpt("main", "Game Settings", &subMenu, "main_mods");
self addOpt("main", "Models", &subMenu, "main_mods");
self addOpt("main", "Bullets", &subMenu, "main_mods");
self addOpt("main", "Messages", &subMenu, "main_mods");
self addOpt("main", "Perks", &subMenu, "main_mods");
self addOpt("main", "Admin Menu", &subMenu, "main_mods");
self addOpt("main", "Host Menu", &subMenu, "main_mods");
self addOpt("main", "Aimbot", &subMenu, "main_mods");
self addOpt("main", "Clients", &subMenu, "main_mods");
self addOpt("main", "All Clients", &subMenu, "main_mods");
self addMenu("main_mods", "Main Mods", "main");
self addOpt("main_mods", "God Mode", &func_godmode);
self addOpt("main_mods", "Unlimited Ammo", &func_unlimitedAmmo);
self addOpt("main_mods", "Ufo Mode", &func_ufomode);
self addOpt("main_mods", "Field of View", &test);
self addOpt("main_mods", "Print something!", &test);
}
function initMenu()
{
self.openBox = self createRectangle("CENTER", "CENTER", 480, 0, 200, 0, (0, 0, 0), "white", 1, 0);
self.currentMenu = "main";
self.menuCurs = 0;
for(;;)
{
if(self adsButtonPressed() && self MeleeButtonPressed())
{
if(!isDefined(self.inMenu))
{
self.inMenu = true;
self.openText = self createText("default", 2, "TOP", "TOP", self.openBox.x - 40, 20, 2, 1, (0, 0, 0), self.menu["name"]);
self.openBox.alpha = .7;
menuOpts = self.menuAction[self.currentMenu].opt.size;
self.openBox scaleOverTime(.4, 200, ((455)+45));
wait .4;
self.openText setText(self.menuAction[self.currentMenu].title);
string = "";
for(m = 0; m < menuOpts; m++)
string+= self.menuAction[self.currentMenu].opt[m]+"\n";
self.menuText = self createText("default", 1.5, "TOP", "TOP", self.openBox.x - 80, 100, 3, 1, undefined, string);
self.scrollBar = self createRectangle("CENTER", "CENTER", self.openBox.x, ((self.menuCurs*17.98)+((self.menuText.y+2.5)-(17.98/15))), 200, 15, (0, 1, 0), "white", 2, .7);
}
}
if(isDefined(self.inMenu))
{
if(self attackButtonPressed())
{
self.menuCurs++;
if(self.menuCurs > self.menuAction[self.currentMenu].opt.size-1)
self.menuCurs = 0;
self.scrollBar moveOverTime(.15);
self.scrollBar.y = ((self.menuCurs*17.98)+((self.menuText.y+2.5)-(17.98/17)));
wait .15;
}
if(self adsButtonPressed())
{
self.menuCurs--;
if(self.menuCurs < 0)
self.menuCurs = self.menuAction[self.currentMenu].opt.size-1;
self.scrollBar moveOverTime(.15);
self.scrollBar.y = ((self.menuCurs*17.98)+((self.menuText.y+2.5)-(17.98/17)));
wait .15;
}
if(self useButtonPressed())
{
self thread [[self.menuAction[self.currentMenu].func[self.menuCurs]]](self.menuAction[self.currentMenu].inp[self.menuCurs]);
wait .2;
}
if(self meleeButtonPressed())
{
if(!isDefined(self.menuAction[self.currentMenu].parent))
{
self thread func_menuexiut();
}
else
self subMenu(self.menuAction[self.currentMenu].parent);
}
}
wait .05;
}
}
function func_menuexiut()
{
self.inMenu = undefined;
self.openText destroy();
self.openBox scaleOverTime(.4, 200, 30);
self.menuText destroy();
self.scrollBar destroy();
self.openBox.alpha = 0;
wait .4;
self freezecontrols(false);
}
function subMenu(menu)
{
self.menuCurs = 0;
self.currentMenu = menu;
self.scrollBar moveOverTime(.2);
self.scrollBar.y = ((self.menuCurs*17.98)+((self.menuText.y+2.5)-(17.98/15)));
self.menuText destroy();
self.openText setText(self.menuAction[self.currentMenu].title);
menuOpts = self.menuAction[self.currentMenu].opt.size;
wait .2;
string = "";
for(m = 0; m < menuOpts; m++)
string+= self.menuAction[self.currentMenu].opt[m]+"\n";
self.menuText = self createText("default", 1.5, "TOP", "TOP", self.openBox.x - 80, 100, 3, 1, undefined, string);
wait .2;
}
function test()
{
self iPrintln("^9Comming Soon");
}
function addMenu(menu, title, parent)
{
if(!isDefined(self.menuAction))
self.menuAction = [];
self.menuAction[menu] = spawnStruct();
self.menuAction[menu].title = title;
self.menuAction[menu].parent = parent;
self.menuAction[menu].opt = [];
self.menuAction[menu].func = [];
self.menuAction[menu].inp = [];
}
function addOpt(menu, opt, func, inp)
{
m = self.menuAction[menu].opt.size;
self.menuAction[menu].opt[m] = opt;
self.menuAction[menu].func[m] = func;
self.menuAction[menu].inp[m] = inp;
}
function createText(font, fontScale, align, relative, x, y, sort, alpha, glow, text)
{
textElem = newClientHudElem(self);
textElem.sort = sort;
textElem.alpha = alpha;
textElem.x = x;
textElem.y = y;
textElem.glowColor = glow;
textElem.glowAlpha = 1;
textElem.fontScale = fontScale;
textElem setText(text);
return textElem;
}
function createRectangle(align, relative, x, y, width, height, color, shader, sort, alpha)
{
boxElem = newClientHudElem(self);
boxElem.elemType = "bar";
if(!level.splitScreen)
{
boxElem.x = -2;
boxElem.y = -2;
}
boxElem.width = width;
boxElem.height = height;
boxElem.align = align;
boxElem.relative = relative;
boxElem.xOffset = 0;
boxElem.yOffset = 0;
boxElem.children = [];
boxElem.sort = sort;
boxElem.color = color;
boxElem.alpha = alpha;
boxElem setShader(shader, width, height);
boxElem.hidden = false;
boxElem.x = x;
boxElem.y = y;
boxElem.alignX = align;
boxElem.alignY = relative;
return boxElem;
}
// Functions
function func_godmode()
{
if(!isDefined(self.gamevars["godmode"]))
{
self.gamevars["godmode"] = true;
self enableInvulnerability();
self iprintln("God Mode ^2ON");
}
else
{
self.gamevars["godmode"] = undefined;
self disableInvulnerability();
self iprintln("God Mode ^1OFF");
}
}
function func_ufomode()
{
if(!isDefined(self.gamevars["ufomode"]))
{
self thread func_activeUfo();
self.gamevars["ufomode"] = true;
self iPrintln("UFO Mode ^2ON");
self iPrintln("Press [{+frag}] To Fly");
}
else
{
self notify("func_ufomode_stop");
self.gamevars["ufomode"] = undefined;
self iPrintln("UFO Mode ^1OFF");
}
}
function func_activeUfo()
{
self endon("func_ufomode_stop");
self.Fly = 0;
UFO = spawn("script_model",self.origin);
for(;;)
{
if(self FragButtonPressed())
{
self playerLinkTo(UFO);
self.Fly = 1;
}
else
{
self unlink();
self.Fly = 0;
}
if(self.Fly == 1)
{
Fly = self.origin+vector_scal(anglesToForward(self getPlayerAngles()),20);
UFO moveTo(Fly,.01);
}
wait .001;
}
}
function vector_scal(vec, scale)
{
vec = (vec[0] * scale, vec[1] * scale, vec[2] * scale);
return vec;
}
function func_unlimitedAmmo()
{
if(!isDefined(self.gamevars["ammo_weap"]))
{
self notify("stop_ammo");
self thread func_ammo();
self iPrintln("Unlimited Ammo ^2ON");
self.gamevars["ammo_weap"] = true;
}
else
{
self notify("stop_ammo");
self.gamevars["ammo_weap"] = undefined;
self iPrintln("Unlimited Ammo ^1OFF");
}
}
function func_ammo()
{
self endon("stop_ammo");
for(;;)
{
if(self.gamevars["ammo_weap"]==true)
{
if ( self getcurrentweapon() != "none" )
{
self setweaponammostock( self getcurrentweapon(), 1337 );
self setweaponammoclip( self getcurrentweapon(), 1337 );
}
}
wait .1;
}
}
Attachments
Last edited: