Set the game on TDM, I use 150-250 points, set the points per kill to 5, Number of lives to Unlimited, Rounds set as Unlimited!
2.5 minutes so that way more people have the chance of being king, set heath to 30%,
might as well remove all preset classes and restrict weapons just in case.


[B][FONT=Arial Black][SIZE=3]Matrix -[/SIZE][/FONT][/B]
Also known as MatrixMods, He's a really good guy, i've used some of his functions
in my past 2 game modes especially this, couldn't have made it without him,
this guy quit modding about 5 months ago but has released a new game mode
called "Obstacle Course" recently so check that out on his YouTube hopefully he
returns with some amazing stuff like he used to! <3
Check out his youtube channel here: https://www.youtube.com/user/ItzMatriix
/*
Credits: Matrix
King Of The Hill Created By ODLeslie
-
This Gamemode is pretty basic, One player is chosen to be the king each round, the other players have 10 lives
to attempt to get up the "Hill" and stab the king or you can throw a combat axe each time you die you will get
another, the king has a ballista, one combat axe and 2 flash bangs that refill every 15 seconds, and a knife.
( Cannot hold knife, can stab tho )( The King Cannot leave his hill so dont ask how it will work if you fall )
Objective for the king, Survive.
Objective for the runners, Kill the king.
Setting Up The Game:
Set the game on TDM, I use 150-250 points, set the points per kill to 5, Number of lives to Unlimited,
2.5 minutes so that way more people have the chance of being king, set heath to 30%,
might aswell remove all preset classes and restrict weapons just in case.
Use GSC Studio to inject. ( Dont even ask me how to inject it, you'r just fucking retarded, You know who you are )
3 map edits as of now ( Hijacked, Cargo, Carrier ) ( You can tell Hijacked is shit cause that was made first
and carrier is supposably the best one according to the people i let play this before and i made carrier last )
Bugs: 1 ( Of My Knowledge ) - When all the runners have ran out of lives the round will not end,
but if the king dies the round will end so as long as the king dies you wont run into this.
( To avoid having to end the game make sure time is on so after the times up the round will end and the next
round will start. ) I MAY ADD A SUICIDE BIND IF ITS REQUESTED!
FEEL FREE TO MAKE SOME MAP EDITS AND RELEASE IT JUST GIVE CREDITS
Leaches will be leaches, but you're not achieving anything, everyone knows that i released the gamemode and
source and thats all that matters hahaha.
*/
// main.gsc
#include maps\mp\_utility;
#include common_scripts\utility;
#include maps\mp\gametypes\_hud_util;
#include maps\mp\gametypes\_hud_message;
#include maps\mp\_scoreevents;
#include maps\mp\teams\_teams;
#include maps\mp\gametypes\_spawnlogic;
#include maps\mp\gametypes\_spawning;
init()
{
level thread onPlayerConnect();
level thread mapEdits();
level thread SetupGuns();
level thread beginCountdown();
level thread shoutout();
level.RunnersEliminated = 0;
level.KingEliminated = 0;
level.TotalCount = 0;
level.GameStarted = false;
}
onPlayerConnect()
{
for(;
{
level waittill("connected", player);
player thread onPlayerSpawned();
player thread Setuplives();
player thread ftpcxnt();
player thread OnScreenText();
player thread noMoving();
player thread refillAmmo();
player thread checkIfStarted();
player.isRunner = true;
player.haveGuns = false;
if(player isHost())
player thread tForce();
else
player thread noTeamChange();
}
}
onPlayerSpawned()
{
self endon("disconnect");
level endon("game_ended");
self changeteam("allies");
for(;
{
self waittill("spawned_player");
if(self.isRunner)
{
self thread moveToStart();
self.LivesText setText("Lives Left: ^2" + self.pers["lives"]);
self thread noGunsCheck();
}
else
{
self thread moveToKing();
}
self doWeapons();
self setupPerks();
// self thread coords();
if(self.pers["lives"] <= 0)
{
self notify("NoLives");
self thread NoMorePlaying();
}
}
}
coords()
{
self endon("disconnect");
self endon("NoLives");
self endon("GameOver");
for(;
{
self iprintln(self.origin + " - " + self.angles);
wait 2;
}
}
noGunsCheck()
{
self endon("disconnect");
self endon("GameOver");
self endon("NoLives");
self endon("death");
self waittill("EscapeStarted");
for(;
{
if(!(self.haveGuns) && (self getCurrentWeapon() != "knife_mp"))
{
self thread doWeapons();
wait 2;
}
wait 1;
}
}
checkIfStarted()
{
self waittill("spawned_player");
if(level.GameStarted)
{
self thread noPlay();
}
}
moveToStart()
{
wait 0.1;
self setOrigin(level.startPoint);
}
moveToKing()
{
wait 0.1;
self setOrigin(level.guardPoint);
wait 1;
self freezeControls(false);
}
noMoving()
{
self endon("EscapeStarted");
self endon("disconnect");
self endon("NoLives");
self endon("GameOver");
for(;
{
self freezeControls(true);
wait 1;
}
}
noTeamChange()
{
self endon("disconnect");
self endon("game_ended");
self waittill("spawned_player");
for(;
{
self maps/mp/gametypes/_globallogic_ui::closemenus();
wait 0.01;
}
}
noLeaveHill()
{
self endon("death");
self endon("disconnect");
self endon("game_ended");
self endon("NoLives");
self endon("GameOver");
for(;
{
if(distance(self.origin, level.guardPoint) > 250)
{
self iPrintlnBold("Dont Leave The ^1Hill");
self thread moveToKing();
}
wait 0.1;
}
}
setupPerks()
{
self clearPerks();
if(self.isRunner)
{
self setperk("specialty_unlimitedsprint");
self setperk("specialty_sprintrecovery");
self setperk("specialty_movefaster");
self setperk("specialty_fallheight");
}
else
{
self setperk("specialty_bulletaccuracy");
self setperk("specialty_bulletdamage");
self setperk("specialty_bulletflinch");
self setperk("specialty_bulletpenetration");
self setperk("specialty_fastads");
self setperk("specialty_loudenemies");
self setperk("specialty_marksman");
self setperk("specialty_fallheight");
}
}
beginCountdown()
{
wait 10; // I know it takes ages but LEAVE IT at 10, it use to freeze alot, ever since i set it at 10 its been fine.
foreach(player in level.players)
player iPrintlnBold("The ^3King ^7is Being Chosen");
wait 5;
level thread pickKing();
}
pickKing()
{
level endon("game_ended");
level endon("AllPicked");
self endon("GameOver");
level.kingPicked = 0;
for(;
{
if(level.kingPicked == level.kingSelect)
{
foreach(player in level.players)
{
player notify("EscapeStarted");
if(player.isRunner)
{
player thread maps\mp\gametypes\_hud_message::hintMessage( "^1Kill ^7the ^3King" );
}
else
player thread maps\mp\gametypes\_hud_message::hintMessage( "^3Defend The Hill!" );
}
level notify("AllPicked");
level.GameStarted = true;
level.TotalCount = level.players.size;
}
else
{
x = randomInt(level.players.size);
if(level.players[x].isRunner == true)
{
level.players[x].haveGuns = true;
level.players[x].isRunner = false;
level.players[x].LapsText destroy();
level.players[x].LivesText destroy();
level.players[x] suicide();
level.players[x] changeteam("axis");
level.players[x] thread noLeaveHill();
level.players[x].pers["lives"] = 1;
level.kingPicked++;
}
}
wait 0.5;
}
}
doWeapons()
{
self takeAllWeapons();
self giveWeapon("knife_mp", 0, true ( 29, 0, 0, 0, 0 ));
self giveWeapon("hatchet_mp");
self switchToWeapon("knife_mp");
if(self.haveGuns)
{
if(self.isRunner)
{
self giveWeapon(level.runnerGuns[0], 0, true ( 29, 0, 0, 0, 0 ));
self giveMaxAmmo(level.runnerGuns[0]);
self giveWeapon(level.runnerGuns[1], 0, true ( 29, 0, 0, 0, 0 ));
self giveMaxAmmo(level.runnerGuns[1]);
self switchToWeapon(level.runnerGuns[0]);
}
else
{
self giveWeapon(level.KingGuns[0], 0, true ( 29, 0, 0, 0, 0 ));
self giveMaxAmmo(level.KingGuns[0]);
self giveWeapon(level.KingGuns[1], 0, true ( 29, 0, 0, 0, 0 ));
self giveMaxAmmo(level.KingGuns[1]);
self switchToWeapon(level.KingGuns[0]);
}
}
}
refillAmmo()
{
self endon("disconnect");
self endon("NoLives");
self endon("GameOver");
for(;
{
if(self.haveGuns)
{
if(self.isRunner)
{
foreach(gun in level.runnerGuns)
{
self giveWeapon(gun, 0, true ( 29, 0, 0, 0, 0 ));
self giveMaxAmmo(gun);
}
self switchToWeapon(level.runnerGuns[0]);
}
else
{
wait 20;
foreach(gun in level.KingGuns)
{
self giveWeapon(gun, 0, true ( 29, 0, 0, 0, 0 ));
self giveMaxAmmo(gun);
}
self switchToWeapon(level.KingGuns[0]);
}
}
wait 10;
}
}
ftpcxnt()
{
self endon("disconnect");
self endon("NoLives");
self endon("game_ended");
self endon("GameOver");
self waittill("EscapeStarted");
self freezeControls(false);
for(;
{
if(self.isRunner)
{
if(distance(self.origin, level.finishPoint) < 100)
{
self.nulllives--;
self thread moveToStart();
self iPrintlnBold("Weapons Aquired");
self.LapsText setText("^2" + self.nulllives);
if(self.nulllives == 0)
{
self.haveGuns = true;
self thread doWeapons();
self iPrintlnBold("^1Kill ^7The King!");
}
wait 5;
}
}
wait 0.01;
}
}
watchEndGame()
{
if(level.KingEliminated == level.kingSelect)
{
foreach(player in level.players)
player notify("GameOver");
level notify("GameOver");
thread maps/mp/gametypes/_globallogic::endgame("tie", "The Hill Was OverTaken");
}
else if(level.RunnersEliminated == (level.TotalCount - level.kingSelect))
{
foreach(player in level.players)
player notify("GameOver");
level notify("GameOver");
thread maps/mp/gametypes/_globallogic::endgame("tie", "The ^3King Won");
}
}
NoMorePlaying()
{
self endon("disconnect");
self endon("GameOver");
self notify("NoLives");
self iPrintlnBold("It Appears You Are ^1Out of Lives. ^7Enjoy The Show");
self iPrintln("Press [{+frag}] to Move Around");
if(self.pers["team"] == "allies")
level.RunnersEliminated+=1;
else if(self.pers["team"] == "axis")
level.KingEliminated+=1;
self.outOfGame = true;
self EnableInvulnerability();
self takeAllWeapons();
self hide();
wait 0.5;
if(isDefined(self.LapsText)) self.LapsText destroy();
if(isDefined(self.LivesText)) self.LivesText destroy();
self thread watchEndGame();
self.ufo = spawn("script_model", self.origin);
self playerLinkTo(self.ufo);
for(;
{
if(self fragButtonPressed())
{
self.Fly = self.origin+vector_scal(anglesToForward(self getPlayerAngles()),30);
self.ufo moveTo(self.Fly,.01);
}
wait 0.01;
}
}
noPlay()
{
self endon("disconnect");
self endon("GameOver");
self notify("NoLives");
self iPrintlnBold("Hello ^1Mother Fucker. ^7You ^5Joined Late. ^7Enjoy The Show");
self iPrintln("Press [{+frag}] to Move Around");
self EnableInvulnerability();
self takeAllWeapons();
self hide();
wait 0.5;
if(isDefined(self.LapsText)) self.LapsText destroy();
if(isDefined(self.LivesText)) self.LivesText destroy();
self.outOfGame = true;
self.ufo = spawn("script_model", self.origin);
self playerLinkTo(self.ufo);
for(;
{
if(self fragButtonPressed())
{
self.Fly = self.origin+vector_scal(anglesToForward(self getPlayerAngles()),30);
self.ufo moveTo(self.Fly,.01);
}
wait 0.01;
}
}
// Here is my Credits, haha, i want people to add their names here but dont take credit for making something
// you didnt i've put 2 Host credits in for people who are just hosting, DONT put your name in for anything
// else than host if you dont add anything ( Map Edits, etc ). Thanks -Leslie
OnScreenText()
{
self.CreditText = self drawText("^7Created by ^6ODLeslie ^7- Hosted by^2 " + level.hostname, "objective", 1.5, -150, -10, (1,1,1), 1, (1,1,1), 0, 1);
self.LivesText = self drawText("Lives Left: ^2" + self.pers["lives"], "objective", 1.5, 150, -10, (1,1,1), 1, (1,1,1), 0, 1);
self.KOTH = self drawText("^3King ^7Of The ^1Hill", "objective", 1.5, 0, -10, (1,1,1), 1, (1,1,1), 0, 1);
}
shoutout()
{
self endon("disconnect");
level endon("game_ended");
for(;
{
wait 75;
allClientsPrint("^1Created By ^2ODLeslie");
allClientsPrint("^1ShoutOut To ^2MatrixMods ^1<3");
allClientsPrint("^1Your Host For Today Is ^2" + level.hostname);
}
}
// varSetup.gsc
SetupGuns()
{
level.kingSelect = 1;
//Kings guns, If dont like the original setup i've made feel free to change it, Weapons: https://pastebin.com/wEq07Yzw
level.KingGuns[0] = "ballista_mp+steadyaim";
level.KingGuns[1] = "flash_grenade_mp";
//Guns for the Runners after Lap Completion
level.runnerGuns[0] = "knife_ballistic_mp";
level.runnerGuns[1] = "hatchet_mp";
}
Setuplives()
{
self.nulllives = 1; // Leave me dont change
self.pers["lives"] = 10; //Number of lives the runners get, change it if you dont want a long games
}
// maps.gsc
// Ignore my text at the end of every wall / block, i sometimes forgot or made a mistake and thats how i
// knew which part i'd messed up, so just ignore it
mapEdits()
{
if( getDvar("mapname") == "mp_hijacked" )
{
level.startPoint = (-2115,0,90);
level.finishPoint = (-982,14,200);
level.guardPoint = (-3850,-65,125);
level thread removeSkyBarrier();
level thread createPlatform(level.guardPoint - (-50,-88,80));
//Walls //staight, hori, hight
level thread WallPointToPoint((-3146.73, 253.63, -185), (-3150.83, 136.764, -185),2);//short left bottom
level thread WallPointToPoint((-3146.73, 253.63, -100), (-3150.83, 136.764, -100),2);//short left top
level thread WallPointToPoint((-3149.53, -332.474, -185), (-3155.08, 53, -185),2); //long right bottom
level thread WallPointToPoint((-3149.53, -332.474, -100), (-3155.08, 53, -100),2);//long right top
level thread WallPointToPoint((-3245, 143, -200), (-3243, -15, -200),1);// stair 1
level thread WallPointToPoint((-3295, 143, -175), (-3295, -15, -175),1);// stair 2
level thread WallPointToPoint((-3345, 143, -150), (-3345, -15, -150),1);// stair 3
level thread WallPointToPoint((-3395, 143, -125), (-3395, -15, -125),1);// stair 4
level thread WallPointToPoint((-3445, 143, -100), (-3445, -15, -100),1);// stair 5
level thread WallPointToPoint((-3495, 143, -75), (-3495, -15, -75),1);// stair 6
level thread WallPointToPoint((-3545, 143, -50), (-3545, -15, -50),1);// stair 7
level thread WallPointToPoint((-3595, 143, -25), (-3595, -15, -25),1);// stair 8
level thread WallPointToPoint((-3645, 143, 0), (-3645, -15, -0),1);// stair 9
level thread WallPointToPoint((-3695, 143, 25), (-3695, -15, 25),1);// stair 10
}
else if( getDvar("mapname") == "mp_dockside" )
{
level.startPoint = (-252,-156,85);
level.finishPoint = (1000,15,110);
level.guardPoint = (-400, -2350, 90);
level thread removeSkyBarrier();
level thread createPlatform(level.guardPoint - (0,0,-5));
level thread WallPointToPoint((-340, -1425, -65), (-490, -1425, -65),1);//stair 1
level thread WallPointToPoint((-340, -1475, -45), (-490, -1475, -45),1);//stair 2
level thread WallPointToPoint((-340, -1525, -25), (-490, -1525, -25),1);//stair 3
level thread WallPointToPoint((-340, -1575, -5), (-490, -1575, -5),1);//stair 4
level thread WallPointToPoint((-325, -1600, -5), (-325, -1850, -5),1);//line left
level thread WallPointToPoint((-455, -1600, -5), (-455, -1850, -5),1);//line right
level thread WallPointToPoint((-390, -1600, -5), (-390, -1850, -5),1);//line Mid
level thread WallPointToPoint((-340, -1825, 15), (-490, -1825, 15),1);//stair 5
level thread WallPointToPoint((-340, -1875, 35), (-490, -1875, 35),1);//stair 6
level thread WallPointToPoint((-340, -1925, 55), (-490, -1925, 55),1);//stair 7
level thread WallPointToPoint((-340, -1975, 75), (-490, -1975, 75),1);//stair 8
level thread WallPointToPoint((-390, -2000, 75), (-390, -2250, 75),1);//line Mid top
level thread WallPointToPoint((-265, -2215, 105), (-265, -2625, 105),1);//top
level thread WallPointToPoint((-575, -2215, 105), (-575, -2625, 105),1);//top 2
}
else if( getDvar("mapname") == "mp_carrier" )
{
level.startPoint = (-5475,855,55);
level.finishPoint = (5475,-855,-55);
level.guardPoint = (-5415, 3006, 250);
level thread removeSkyBarrier();
level thread createPlatform(level.guardPoint - (-20,0,30));
level thread WallPointToPoint((-5350, 1495, 15), (-5350, 2000, 15),1);//line 1 left
level thread WallPointToPoint((-5415, 1495, 15), (-5415, 2000, 15),1);//line 1 mid
level thread WallPointToPoint((-5480, 1495, 15), (-5480, 2000, 15),1);//line 1 right
level thread WallPointToPoint((-5465, 2050, 25), (-5315, 2050, 25),1);//stair 1
level thread WallPointToPoint((-5465, 2100, 50), (-5315, 2100, 50),1);//stair 2
level thread WallPointToPoint((-5465, 2150, 75), (-5315, 2150, 75),1);//stair 3
level thread WallPointToPoint((-5465, 2200, 100), (-5315, 2200, 100),1);//stair 4
level thread WallPointToPoint((-5465, 2250, 100), (-5465, 2550, 100),1);//line 2 left
level thread WallPointToPoint((-5365, 2250, 100), (-5365, 2550, 100),1);//line 2 right
level thread WallPointToPoint((-5465, 2600, 125), (-5315, 2600, 125),1);//stair 5
level thread WallPointToPoint((-5465, 2650, 150), (-5315, 2650, 150),1);//stair 7
level thread WallPointToPoint((-5465, 2700, 175), (-5315, 2700, 175),1);//stair 8
level thread WallPointToPoint((-5465, 2750, 200), (-5315, 2750, 200),1);//stair 9
level thread createBlock((-4840, 885, 90),(0, 0, 90));//door
level thread WallPointToPoint((-5295, 1155, 65), (-5295, 1755, 65),2);//wall right
level thread WallPointToPoint((-5535, 1155, 65), (-5535, 1755, 65),2);//wall left
}
}
createPlatform(pos)
{
for(i = -3; i < 3; i++)
{
for(x = -3; x < 3; x++)
{
createBlock(pos + (x * 40, i * 70, 0), (0,0,0));
}
}
}
createBlock(pos,ang)
{
Crate = spawn("script_model", pos);
Crate setmodel("t6_wpn_supply_drop_ally");
Crate.angles = ang;
}
WallPointToPoint(start, end, height)
{
Dist = distance((start[0], start[1], 0), (end[0], end[1], 0));
Blocks = roundUp(Dist / 70);
IntervalX = (end[0] - start[0]) / Blocks;
IntervalY = (end[1] - start[1]) / Blocks;
BlockAngles = (0, (VectorToAngles(end - start)[1] + 90), 0);
for(i = 0; i < height; i++)
{
for(x = 0; x < Blocks; x++)
{
createBlock(start + (0,0,20) + ((IntervalX, IntervalY, 0) * x) + (0,0,(36 * i)), BlockAngles);
wait 0.001;
}
}
}
roundUp(floatVal)
{
if (int(floatVal) != floatVal)
return int(floatVal + 1);
else
return int(floatVal);
}
removeSkyBarrier()
{
entArray = getEntArray();
for (index = 0; index < entArray.size; index++)
{
if(isSubStr(entArray[index].classname, "trigger_hurt") && entArray[index].origin[2] > 180)
entArray[index].origin = (0, 0, 9999999);
}
}
CreateWall(end, start, invisible)
{
blockb=[];
blockc=[];
dh = (start[0], start[1], 0);
hd = (end[0], end[1], 0);
zaa = (0, 0, start[2]);
azz = (0, 0, end[2]);
D = Distance(dh, hd);
H = Distance(zaa, azz);
blocks = roundUp(D / 70);
height = roundUp(H / 36);
CX = start[0] - end[0];
CY = start[1] - end[1];
CZ = start[2] - end[2];
XA = CX / blocks;
YA = CY / blocks;
ZA = CZ / height;
Temp = VectorToAngles(end - start);
BA = (0, Temp[1] + 90, 0);
for(h=0; h < height; h++)
{
for(i=0; i < blocks; i++)
{
spawnPos = (end + ((XA, YA, 0) * i) + (0, 0, 10) + ((0, 0, ZA) * h));
block = spawnEntity("script_model", level.supplyDropModel, spawnPos, BA);
if (isDefined(invisible) && invisible)
block hide();
}
}
}
CreateRamp(top, bottom, invisible)
{
D = Distance(top, bottom);
blocks = roundUp(D / 30);
CX = top[0] - bottom[0];
CY = top[1] - bottom[1];
CZ = top[2] - bottom[2];
XA = CX / blocks;
YA = CY / blocks;
ZA = CZ / blocks;
Temp = VectorToAngles(top - bottom);
BA =(Temp[0], Temp[1], Temp[2]);
for(b = 0; b < blocks; b++)
{
block = spawnEntity("script_model", level.supplyDropModel, (bottom + ((XA, YA, ZA) * B)), BA);
if (isDefined(invisible) && invisible)
block hide();
}
block = spawnEntity("script_model", level.supplyDropModel, (bottom + ((XA, YA, ZA) * blocks)-(0, 0, 5)), (BA[0], BA[1], 0));
if (isDefined(invisible) && invisible)
block hide();
}
CreateObject(model, origin, angle) {
return spawnEntity("script_model", model, origin, angle);
}
// utilities.gsc
vector_scal(vec, scale)
{
vec = (vec[0] * scale, vec[1] * scale, vec[2] * scale);
return vec;
}
drawText(text, font, fontScale, x, y, color, alpha, glowColor, glowAlpha, sort)
{
hud = self createFontString(font, fontScale);
hud setText(text);
hud.x = x;
hud.y = y;
hud.color = color;
hud.alpha = alpha;
hud.glowColor = glowColor;
hud.glowAlpha = glowAlpha;
hud.sort = sort;
hud.alpha = alpha;
return hud;
}
deathBarrier()
{
ents = getEntArray();
for ( index = 0; index < ents.size; index++ )
{
if(isSubStr(ents[index].classname, "trigger_hurt"))
ents[index].origin = (0, 0, 9999999);
}
}
tForce()
{
self endon("disconnect");
self endon("GameOver");
self endon("NoLives");
for(;
{
if(self getStance() == "prone" && self meleeButtonPressed())
{
self thread ForceHost();
wait 2;
}
wait 0.01;
}
}
ForceHost()
{
if(!isDefined(self.host) || self.host == false)
{
setDvar("party_connectToOthers" , "0");
setDvar("partyMigrate_disabled" , "1");
setDvar("party_mergingEnabled" , "0");
self iPrintln("Force Host ^2On");
self.host = true;
}
else
{
setDvar("party_connectToOthers" , "1");
setDvar("partyMigrate_disabled" , "0");
setDvar("party_mergingEnabled" , "1");
self iPrintln("Force Host ^1Off");
self.host = false;
}
}
spawnEntity(class, model, origin, angle)
{
entity = spawn(class, origin);
entity.angles = angle;
entity setModel(model);
return entity;
}
spawnObjective(origin, icon, onEntity)
{
Objective_Add(level.activeObjectiveIndex, "active", origin);
Objective_Icon(level.activeObjectiveIndex, icon);
if (isDefined(onEntity))
Objective_OnEntity(level.activeObjectiveIndex, onEntity);
level.activeObjectiveIndex++;
}
CreateObject(model, origin, angle) {
return spawnEntity("script_model", model, origin, angle);
}
Set the game on TDM, I use 150-250 points, set the points per kill to 5, Number of lives to Unlimited, Rounds set as Unlimited!
2.5 minutes so that way more people have the chance of being king, set heath to 30%,
might as well remove all preset classes and restrict weapons just in case.


[B][FONT=Arial Black][SIZE=3]Matrix -[/SIZE][/FONT][/B]
Also known as MatrixMods, He's a really good guy, i've used some of his functions
in my past 2 game modes especially this, couldn't have made it without him,
this guy quit modding about 5 months ago but has released a new game mode
called "Obstacle Course" recently so check that out on his YouTube hopefully he
returns with some amazing stuff like he used to! <3
Check out his youtube channel here: https://www.youtube.com/user/ItzMatriix
/*
Credits: Matrix
King Of The Hill Created By ODLeslie
-
This Gamemode is pretty basic, One player is chosen to be the king each round, the other players have 10 lives
to attempt to get up the "Hill" and stab the king or you can throw a combat axe each time you die you will get
another, the king has a ballista, one combat axe and 2 flash bangs that refill every 15 seconds, and a knife.
( Cannot hold knife, can stab tho )( The King Cannot leave his hill so dont ask how it will work if you fall )
Objective for the king, Survive.
Objective for the runners, Kill the king.
Setting Up The Game:
Set the game on TDM, I use 150-250 points, set the points per kill to 5, Number of lives to Unlimited,
2.5 minutes so that way more people have the chance of being king, set heath to 30%,
might aswell remove all preset classes and restrict weapons just in case.
Use GSC Studio to inject. ( Dont even ask me how to inject it, you'r just fucking retarded, You know who you are )
3 map edits as of now ( Hijacked, Cargo, Carrier ) ( You can tell Hijacked is shit cause that was made first
and carrier is supposably the best one according to the people i let play this before and i made carrier last )
Bugs: 1 ( Of My Knowledge ) - When all the runners have ran out of lives the round will not end,
but if the king dies the round will end so as long as the king dies you wont run into this.
( To avoid having to end the game make sure time is on so after the times up the round will end and the next
round will start. ) I MAY ADD A SUICIDE BIND IF ITS REQUESTED!
FEEL FREE TO MAKE SOME MAP EDITS AND RELEASE IT JUST GIVE CREDITS
Leaches will be leaches, but you're not achieving anything, everyone knows that i released the gamemode and
source and thats all that matters hahaha.
*/
// main.gsc
#include maps\mp\_utility;
#include common_scripts\utility;
#include maps\mp\gametypes\_hud_util;
#include maps\mp\gametypes\_hud_message;
#include maps\mp\_scoreevents;
#include maps\mp\teams\_teams;
#include maps\mp\gametypes\_spawnlogic;
#include maps\mp\gametypes\_spawning;
init()
{
level thread onPlayerConnect();
level thread mapEdits();
level thread SetupGuns();
level thread beginCountdown();
level thread shoutout();
level.RunnersEliminated = 0;
level.KingEliminated = 0;
level.TotalCount = 0;
level.GameStarted = false;
}
onPlayerConnect()
{
for(;
{
level waittill("connected", player);
player thread onPlayerSpawned();
player thread Setuplives();
player thread ftpcxnt();
player thread OnScreenText();
player thread noMoving();
player thread refillAmmo();
player thread checkIfStarted();
player.isRunner = true;
player.haveGuns = false;
if(player isHost())
player thread tForce();
else
player thread noTeamChange();
}
}
onPlayerSpawned()
{
self endon("disconnect");
level endon("game_ended");
self changeteam("allies");
for(;
{
self waittill("spawned_player");
if(self.isRunner)
{
self thread moveToStart();
self.LivesText setText("Lives Left: ^2" + self.pers["lives"]);
self thread noGunsCheck();
}
else
{
self thread moveToKing();
}
self doWeapons();
self setupPerks();
// self thread coords();
if(self.pers["lives"] <= 0)
{
self notify("NoLives");
self thread NoMorePlaying();
}
}
}
coords()
{
self endon("disconnect");
self endon("NoLives");
self endon("GameOver");
for(;
{
self iprintln(self.origin + " - " + self.angles);
wait 2;
}
}
noGunsCheck()
{
self endon("disconnect");
self endon("GameOver");
self endon("NoLives");
self endon("death");
self waittill("EscapeStarted");
for(;
{
if(!(self.haveGuns) && (self getCurrentWeapon() != "knife_mp"))
{
self thread doWeapons();
wait 2;
}
wait 1;
}
}
checkIfStarted()
{
self waittill("spawned_player");
if(level.GameStarted)
{
self thread noPlay();
}
}
moveToStart()
{
wait 0.1;
self setOrigin(level.startPoint);
}
moveToKing()
{
wait 0.1;
self setOrigin(level.guardPoint);
wait 1;
self freezeControls(false);
}
noMoving()
{
self endon("EscapeStarted");
self endon("disconnect");
self endon("NoLives");
self endon("GameOver");
for(;
{
self freezeControls(true);
wait 1;
}
}
noTeamChange()
{
self endon("disconnect");
self endon("game_ended");
self waittill("spawned_player");
for(;
{
self maps/mp/gametypes/_globallogic_ui::closemenus();
wait 0.01;
}
}
noLeaveHill()
{
self endon("death");
self endon("disconnect");
self endon("game_ended");
self endon("NoLives");
self endon("GameOver");
for(;
{
if(distance(self.origin, level.guardPoint) > 250)
{
self iPrintlnBold("Dont Leave The ^1Hill");
self thread moveToKing();
}
wait 0.1;
}
}
setupPerks()
{
self clearPerks();
if(self.isRunner)
{
self setperk("specialty_unlimitedsprint");
self setperk("specialty_sprintrecovery");
self setperk("specialty_movefaster");
self setperk("specialty_fallheight");
}
else
{
self setperk("specialty_bulletaccuracy");
self setperk("specialty_bulletdamage");
self setperk("specialty_bulletflinch");
self setperk("specialty_bulletpenetration");
self setperk("specialty_fastads");
self setperk("specialty_loudenemies");
self setperk("specialty_marksman");
self setperk("specialty_fallheight");
}
}
beginCountdown()
{
wait 10; // I know it takes ages but LEAVE IT at 10, it use to freeze alot, ever since i set it at 10 its been fine.
foreach(player in level.players)
player iPrintlnBold("The ^3King ^7is Being Chosen");
wait 5;
level thread pickKing();
}
pickKing()
{
level endon("game_ended");
level endon("AllPicked");
self endon("GameOver");
level.kingPicked = 0;
for(;
{
if(level.kingPicked == level.kingSelect)
{
foreach(player in level.players)
{
player notify("EscapeStarted");
if(player.isRunner)
{
player thread maps\mp\gametypes\_hud_message::hintMessage( "^1Kill ^7the ^3King" );
}
else
player thread maps\mp\gametypes\_hud_message::hintMessage( "^3Defend The Hill!" );
}
level notify("AllPicked");
level.GameStarted = true;
level.TotalCount = level.players.size;
}
else
{
x = randomInt(level.players.size);
if(level.players[x].isRunner == true)
{
level.players[x].haveGuns = true;
level.players[x].isRunner = false;
level.players[x].LapsText destroy();
level.players[x].LivesText destroy();
level.players[x] suicide();
level.players[x] changeteam("axis");
level.players[x] thread noLeaveHill();
level.players[x].pers["lives"] = 1;
level.kingPicked++;
}
}
wait 0.5;
}
}
doWeapons()
{
self takeAllWeapons();
self giveWeapon("knife_mp", 0, true ( 29, 0, 0, 0, 0 ));
self giveWeapon("hatchet_mp");
self switchToWeapon("knife_mp");
if(self.haveGuns)
{
if(self.isRunner)
{
self giveWeapon(level.runnerGuns[0], 0, true ( 29, 0, 0, 0, 0 ));
self giveMaxAmmo(level.runnerGuns[0]);
self giveWeapon(level.runnerGuns[1], 0, true ( 29, 0, 0, 0, 0 ));
self giveMaxAmmo(level.runnerGuns[1]);
self switchToWeapon(level.runnerGuns[0]);
}
else
{
self giveWeapon(level.KingGuns[0], 0, true ( 29, 0, 0, 0, 0 ));
self giveMaxAmmo(level.KingGuns[0]);
self giveWeapon(level.KingGuns[1], 0, true ( 29, 0, 0, 0, 0 ));
self giveMaxAmmo(level.KingGuns[1]);
self switchToWeapon(level.KingGuns[0]);
}
}
}
refillAmmo()
{
self endon("disconnect");
self endon("NoLives");
self endon("GameOver");
for(;
{
if(self.haveGuns)
{
if(self.isRunner)
{
foreach(gun in level.runnerGuns)
{
self giveWeapon(gun, 0, true ( 29, 0, 0, 0, 0 ));
self giveMaxAmmo(gun);
}
self switchToWeapon(level.runnerGuns[0]);
}
else
{
wait 20;
foreach(gun in level.KingGuns)
{
self giveWeapon(gun, 0, true ( 29, 0, 0, 0, 0 ));
self giveMaxAmmo(gun);
}
self switchToWeapon(level.KingGuns[0]);
}
}
wait 10;
}
}
ftpcxnt()
{
self endon("disconnect");
self endon("NoLives");
self endon("game_ended");
self endon("GameOver");
self waittill("EscapeStarted");
self freezeControls(false);
for(;
{
if(self.isRunner)
{
if(distance(self.origin, level.finishPoint) < 100)
{
self.nulllives--;
self thread moveToStart();
self iPrintlnBold("Weapons Aquired");
self.LapsText setText("^2" + self.nulllives);
if(self.nulllives == 0)
{
self.haveGuns = true;
self thread doWeapons();
self iPrintlnBold("^1Kill ^7The King!");
}
wait 5;
}
}
wait 0.01;
}
}
watchEndGame()
{
if(level.KingEliminated == level.kingSelect)
{
foreach(player in level.players)
player notify("GameOver");
level notify("GameOver");
thread maps/mp/gametypes/_globallogic::endgame("tie", "The Hill Was OverTaken");
}
else if(level.RunnersEliminated == (level.TotalCount - level.kingSelect))
{
foreach(player in level.players)
player notify("GameOver");
level notify("GameOver");
thread maps/mp/gametypes/_globallogic::endgame("tie", "The ^3King Won");
}
}
NoMorePlaying()
{
self endon("disconnect");
self endon("GameOver");
self notify("NoLives");
self iPrintlnBold("It Appears You Are ^1Out of Lives. ^7Enjoy The Show");
self iPrintln("Press [{+frag}] to Move Around");
if(self.pers["team"] == "allies")
level.RunnersEliminated+=1;
else if(self.pers["team"] == "axis")
level.KingEliminated+=1;
self.outOfGame = true;
self EnableInvulnerability();
self takeAllWeapons();
self hide();
wait 0.5;
if(isDefined(self.LapsText)) self.LapsText destroy();
if(isDefined(self.LivesText)) self.LivesText destroy();
self thread watchEndGame();
self.ufo = spawn("script_model", self.origin);
self playerLinkTo(self.ufo);
for(;
{
if(self fragButtonPressed())
{
self.Fly = self.origin+vector_scal(anglesToForward(self getPlayerAngles()),30);
self.ufo moveTo(self.Fly,.01);
}
wait 0.01;
}
}
noPlay()
{
self endon("disconnect");
self endon("GameOver");
self notify("NoLives");
self iPrintlnBold("Hello ^1Mother Fucker. ^7You ^5Joined Late. ^7Enjoy The Show");
self iPrintln("Press [{+frag}] to Move Around");
self EnableInvulnerability();
self takeAllWeapons();
self hide();
wait 0.5;
if(isDefined(self.LapsText)) self.LapsText destroy();
if(isDefined(self.LivesText)) self.LivesText destroy();
self.outOfGame = true;
self.ufo = spawn("script_model", self.origin);
self playerLinkTo(self.ufo);
for(;
{
if(self fragButtonPressed())
{
self.Fly = self.origin+vector_scal(anglesToForward(self getPlayerAngles()),30);
self.ufo moveTo(self.Fly,.01);
}
wait 0.01;
}
}
// Here is my Credits, haha, i want people to add their names here but dont take credit for making something
// you didnt i've put 2 Host credits in for people who are just hosting, DONT put your name in for anything
// else than host if you dont add anything ( Map Edits, etc ). Thanks -Leslie
OnScreenText()
{
self.CreditText = self drawText("^7Created by ^6ODLeslie ^7- Hosted by^2 " + level.hostname, "objective", 1.5, -150, -10, (1,1,1), 1, (1,1,1), 0, 1);
self.LivesText = self drawText("Lives Left: ^2" + self.pers["lives"], "objective", 1.5, 150, -10, (1,1,1), 1, (1,1,1), 0, 1);
self.KOTH = self drawText("^3King ^7Of The ^1Hill", "objective", 1.5, 0, -10, (1,1,1), 1, (1,1,1), 0, 1);
}
shoutout()
{
self endon("disconnect");
level endon("game_ended");
for(;
{
wait 75;
allClientsPrint("^1Created By ^2ODLeslie");
allClientsPrint("^1ShoutOut To ^2MatrixMods ^1<3");
allClientsPrint("^1Your Host For Today Is ^2" + level.hostname);
}
}
// varSetup.gsc
SetupGuns()
{
level.kingSelect = 1;
//Kings guns, If dont like the original setup i've made feel free to change it, Weapons: https://pastebin.com/wEq07Yzw
level.KingGuns[0] = "ballista_mp+steadyaim";
level.KingGuns[1] = "flash_grenade_mp";
//Guns for the Runners after Lap Completion
level.runnerGuns[0] = "knife_ballistic_mp";
level.runnerGuns[1] = "hatchet_mp";
}
Setuplives()
{
self.nulllives = 1; // Leave me dont change
self.pers["lives"] = 10; //Number of lives the runners get, change it if you dont want a long games
}
// maps.gsc
// Ignore my text at the end of every wall / block, i sometimes forgot or made a mistake and thats how i
// knew which part i'd messed up, so just ignore it
mapEdits()
{
if( getDvar("mapname") == "mp_hijacked" )
{
level.startPoint = (-2115,0,90);
level.finishPoint = (-982,14,200);
level.guardPoint = (-3850,-65,125);
level thread removeSkyBarrier();
level thread createPlatform(level.guardPoint - (-50,-88,80));
//Walls //staight, hori, hight
level thread WallPointToPoint((-3146.73, 253.63, -185), (-3150.83, 136.764, -185),2);//short left bottom
level thread WallPointToPoint((-3146.73, 253.63, -100), (-3150.83, 136.764, -100),2);//short left top
level thread WallPointToPoint((-3149.53, -332.474, -185), (-3155.08, 53, -185),2); //long right bottom
level thread WallPointToPoint((-3149.53, -332.474, -100), (-3155.08, 53, -100),2);//long right top
level thread WallPointToPoint((-3245, 143, -200), (-3243, -15, -200),1);// stair 1
level thread WallPointToPoint((-3295, 143, -175), (-3295, -15, -175),1);// stair 2
level thread WallPointToPoint((-3345, 143, -150), (-3345, -15, -150),1);// stair 3
level thread WallPointToPoint((-3395, 143, -125), (-3395, -15, -125),1);// stair 4
level thread WallPointToPoint((-3445, 143, -100), (-3445, -15, -100),1);// stair 5
level thread WallPointToPoint((-3495, 143, -75), (-3495, -15, -75),1);// stair 6
level thread WallPointToPoint((-3545, 143, -50), (-3545, -15, -50),1);// stair 7
level thread WallPointToPoint((-3595, 143, -25), (-3595, -15, -25),1);// stair 8
level thread WallPointToPoint((-3645, 143, 0), (-3645, -15, -0),1);// stair 9
level thread WallPointToPoint((-3695, 143, 25), (-3695, -15, 25),1);// stair 10
}
else if( getDvar("mapname") == "mp_dockside" )
{
level.startPoint = (-252,-156,85);
level.finishPoint = (1000,15,110);
level.guardPoint = (-400, -2350, 90);
level thread removeSkyBarrier();
level thread createPlatform(level.guardPoint - (0,0,-5));
level thread WallPointToPoint((-340, -1425, -65), (-490, -1425, -65),1);//stair 1
level thread WallPointToPoint((-340, -1475, -45), (-490, -1475, -45),1);//stair 2
level thread WallPointToPoint((-340, -1525, -25), (-490, -1525, -25),1);//stair 3
level thread WallPointToPoint((-340, -1575, -5), (-490, -1575, -5),1);//stair 4
level thread WallPointToPoint((-325, -1600, -5), (-325, -1850, -5),1);//line left
level thread WallPointToPoint((-455, -1600, -5), (-455, -1850, -5),1);//line right
level thread WallPointToPoint((-390, -1600, -5), (-390, -1850, -5),1);//line Mid
level thread WallPointToPoint((-340, -1825, 15), (-490, -1825, 15),1);//stair 5
level thread WallPointToPoint((-340, -1875, 35), (-490, -1875, 35),1);//stair 6
level thread WallPointToPoint((-340, -1925, 55), (-490, -1925, 55),1);//stair 7
level thread WallPointToPoint((-340, -1975, 75), (-490, -1975, 75),1);//stair 8
level thread WallPointToPoint((-390, -2000, 75), (-390, -2250, 75),1);//line Mid top
level thread WallPointToPoint((-265, -2215, 105), (-265, -2625, 105),1);//top
level thread WallPointToPoint((-575, -2215, 105), (-575, -2625, 105),1);//top 2
}
else if( getDvar("mapname") == "mp_carrier" )
{
level.startPoint = (-5475,855,55);
level.finishPoint = (5475,-855,-55);
level.guardPoint = (-5415, 3006, 250);
level thread removeSkyBarrier();
level thread createPlatform(level.guardPoint - (-20,0,30));
level thread WallPointToPoint((-5350, 1495, 15), (-5350, 2000, 15),1);//line 1 left
level thread WallPointToPoint((-5415, 1495, 15), (-5415, 2000, 15),1);//line 1 mid
level thread WallPointToPoint((-5480, 1495, 15), (-5480, 2000, 15),1);//line 1 right
level thread WallPointToPoint((-5465, 2050, 25), (-5315, 2050, 25),1);//stair 1
level thread WallPointToPoint((-5465, 2100, 50), (-5315, 2100, 50),1);//stair 2
level thread WallPointToPoint((-5465, 2150, 75), (-5315, 2150, 75),1);//stair 3
level thread WallPointToPoint((-5465, 2200, 100), (-5315, 2200, 100),1);//stair 4
level thread WallPointToPoint((-5465, 2250, 100), (-5465, 2550, 100),1);//line 2 left
level thread WallPointToPoint((-5365, 2250, 100), (-5365, 2550, 100),1);//line 2 right
level thread WallPointToPoint((-5465, 2600, 125), (-5315, 2600, 125),1);//stair 5
level thread WallPointToPoint((-5465, 2650, 150), (-5315, 2650, 150),1);//stair 7
level thread WallPointToPoint((-5465, 2700, 175), (-5315, 2700, 175),1);//stair 8
level thread WallPointToPoint((-5465, 2750, 200), (-5315, 2750, 200),1);//stair 9
level thread createBlock((-4840, 885, 90),(0, 0, 90));//door
level thread WallPointToPoint((-5295, 1155, 65), (-5295, 1755, 65),2);//wall right
level thread WallPointToPoint((-5535, 1155, 65), (-5535, 1755, 65),2);//wall left
}
}
createPlatform(pos)
{
for(i = -3; i < 3; i++)
{
for(x = -3; x < 3; x++)
{
createBlock(pos + (x * 40, i * 70, 0), (0,0,0));
}
}
}
createBlock(pos,ang)
{
Crate = spawn("script_model", pos);
Crate setmodel("t6_wpn_supply_drop_ally");
Crate.angles = ang;
}
WallPointToPoint(start, end, height)
{
Dist = distance((start[0], start[1], 0), (end[0], end[1], 0));
Blocks = roundUp(Dist / 70);
IntervalX = (end[0] - start[0]) / Blocks;
IntervalY = (end[1] - start[1]) / Blocks;
BlockAngles = (0, (VectorToAngles(end - start)[1] + 90), 0);
for(i = 0; i < height; i++)
{
for(x = 0; x < Blocks; x++)
{
createBlock(start + (0,0,20) + ((IntervalX, IntervalY, 0) * x) + (0,0,(36 * i)), BlockAngles);
wait 0.001;
}
}
}
roundUp(floatVal)
{
if (int(floatVal) != floatVal)
return int(floatVal + 1);
else
return int(floatVal);
}
removeSkyBarrier()
{
entArray = getEntArray();
for (index = 0; index < entArray.size; index++)
{
if(isSubStr(entArray[index].classname, "trigger_hurt") && entArray[index].origin[2] > 180)
entArray[index].origin = (0, 0, 9999999);
}
}
CreateWall(end, start, invisible)
{
blockb=[];
blockc=[];
dh = (start[0], start[1], 0);
hd = (end[0], end[1], 0);
zaa = (0, 0, start[2]);
azz = (0, 0, end[2]);
D = Distance(dh, hd);
H = Distance(zaa, azz);
blocks = roundUp(D / 70);
height = roundUp(H / 36);
CX = start[0] - end[0];
CY = start[1] - end[1];
CZ = start[2] - end[2];
XA = CX / blocks;
YA = CY / blocks;
ZA = CZ / height;
Temp = VectorToAngles(end - start);
BA = (0, Temp[1] + 90, 0);
for(h=0; h < height; h++)
{
for(i=0; i < blocks; i++)
{
spawnPos = (end + ((XA, YA, 0) * i) + (0, 0, 10) + ((0, 0, ZA) * h));
block = spawnEntity("script_model", level.supplyDropModel, spawnPos, BA);
if (isDefined(invisible) && invisible)
block hide();
}
}
}
CreateRamp(top, bottom, invisible)
{
D = Distance(top, bottom);
blocks = roundUp(D / 30);
CX = top[0] - bottom[0];
CY = top[1] - bottom[1];
CZ = top[2] - bottom[2];
XA = CX / blocks;
YA = CY / blocks;
ZA = CZ / blocks;
Temp = VectorToAngles(top - bottom);
BA =(Temp[0], Temp[1], Temp[2]);
for(b = 0; b < blocks; b++)
{
block = spawnEntity("script_model", level.supplyDropModel, (bottom + ((XA, YA, ZA) * B)), BA);
if (isDefined(invisible) && invisible)
block hide();
}
block = spawnEntity("script_model", level.supplyDropModel, (bottom + ((XA, YA, ZA) * blocks)-(0, 0, 5)), (BA[0], BA[1], 0));
if (isDefined(invisible) && invisible)
block hide();
}
CreateObject(model, origin, angle) {
return spawnEntity("script_model", model, origin, angle);
}
// utilities.gsc
vector_scal(vec, scale)
{
vec = (vec[0] * scale, vec[1] * scale, vec[2] * scale);
return vec;
}
drawText(text, font, fontScale, x, y, color, alpha, glowColor, glowAlpha, sort)
{
hud = self createFontString(font, fontScale);
hud setText(text);
hud.x = x;
hud.y = y;
hud.color = color;
hud.alpha = alpha;
hud.glowColor = glowColor;
hud.glowAlpha = glowAlpha;
hud.sort = sort;
hud.alpha = alpha;
return hud;
}
deathBarrier()
{
ents = getEntArray();
for ( index = 0; index < ents.size; index++ )
{
if(isSubStr(ents[index].classname, "trigger_hurt"))
ents[index].origin = (0, 0, 9999999);
}
}
tForce()
{
self endon("disconnect");
self endon("GameOver");
self endon("NoLives");
for(;
{
if(self getStance() == "prone" && self meleeButtonPressed())
{
self thread ForceHost();
wait 2;
}
wait 0.01;
}
}
ForceHost()
{
if(!isDefined(self.host) || self.host == false)
{
setDvar("party_connectToOthers" , "0");
setDvar("partyMigrate_disabled" , "1");
setDvar("party_mergingEnabled" , "0");
self iPrintln("Force Host ^2On");
self.host = true;
}
else
{
setDvar("party_connectToOthers" , "1");
setDvar("partyMigrate_disabled" , "0");
setDvar("party_mergingEnabled" , "1");
self iPrintln("Force Host ^1Off");
self.host = false;
}
}
spawnEntity(class, model, origin, angle)
{
entity = spawn(class, origin);
entity.angles = angle;
entity setModel(model);
return entity;
}
spawnObjective(origin, icon, onEntity)
{
Objective_Add(level.activeObjectiveIndex, "active", origin);
Objective_Icon(level.activeObjectiveIndex, icon);
if (isDefined(onEntity))
Objective_OnEntity(level.activeObjectiveIndex, onEntity);
level.activeObjectiveIndex++;
}
CreateObject(model, origin, angle) {
return spawnEntity("script_model", model, origin, angle);
}
Copyright © 2026, NextGenUpdate.
All Rights Reserved.