What's new

Unsolved I am stuck on this code problem. Please lend a hand.

Risking Perfect

Xbox 360 Tech Support
Staff
Premium
Messages
807
Reaction score
195
To start off, a photo:

It has been too long and I have forgotten how to fix this bs.

Here are all the different parts of the code. The menu is sharky's Zombieland.

main.gsc
Code:
#include maps/mp/gametypes/_globallogic_score;
#include maps/mp/gametypes/_globallogic_utils;
#include maps/mp/_scoreevents;
#include maps/mp/teams/_teams;
#include maps/mp/_utility;
#include common_scripts/utility;
#include maps/mp/gametypes/_hud_util;
#include maps/mp/gametypes/_hud_message;
#include maps/mp/gametypes/_spawnlogic;
#include maps/mp/gametypes/_spawning;
#include maps/mp/killstreaks/_turret_killstreak;

init()
{
    PrecacheItem("minigun_wager_mp");
    PrecacheItem("m32_wager_mp");
    PrecacheModel("t6_wpn_supply_drop_ally");
    PrecacheModel("t6_wpn_supply_drop_axis");
    PrecacheModel("t6_wpn_supply_drop_trap");
    PrecacheModel("mp_flag_green");
    PrecacheModel("mp_flag_red");
    PrecacheModel("mp_flag_neutral");
    
    //Don't Change    
    level.activeZiplines = 0;
    level.activeDoors = 0;
    level.activeMysteryBoxes = 0;
    level.activeObjectiveIndex = 0;
    level.zombiecount = 0;
    level.humancount = 0;
    level.currentgametime = 0;
    level.ingraceperiod = 0;
    level.scoreroundbased = 0;
    level.allow_teamchange = 0;
    level.turretsSpawned = 0;
    level.botsHaveBeenSpawned = false;
    level.timerspawned = false;
    level.zombieSelectionInProgress = true;
    
    //These Can Be Changed
    level.zombieficationTime = 10; //In Seconds
    level.gametime = 1200; //In Seconds
    level.survivorCashBonus = 20;
    level.moneyperkill = 40;
    level.moneyperassist = 20;
    level.moneyperkillzombie = 50;
    level.moneyperzombiedeath = 20;
    level.teamscoreperkill = 0;
    level.teamscoreperdeath = 0;
    level.teamscoreperheadshot = 0;
    level.turretLimit = 5;
    level.amountOfBotsToSpawn = 11;
    level.spawnBots = false;
    level.useCustomMaps = true;
    level.hostCantBecomeZombie = false; //If true host cannot become the starting zombie
    level.enableInformationBar = true;
    level.informationBarText = "Welcome To ^2Se7ensins ^1Zombieland ^7Edited By: Risking Perfect^5 | [{+actionslot 1}] To Buy ^7Some ****^1 | [{+actionslot 3}] To Stop ^7Buying **** | [{+gostand}] To Select Your **** | [{+usereload}] To Back the f*** Up";
    level.supplyDropModel = "t6_wpn_supply_drop_ally";
    level.supplyDropModelAxis = "t6_wpn_supply_drop_axis";
    level.supplyDropModelTrap = "t6_wpn_supply_drop_trap";
    level.teleportFlagStartModel = "mp_flag_green";
    level.teleportFlagEndModel = "mp_flag_red";
    level.teleportFlagBothModel = "mp_flag_neutral";
    wait 10; //Stop Game Crashing
    
    level thread monitorGame();
    level thread monitorTime();
    level thread informationBar();
    level thread onPlayerConnect();
    level thread zombieCountdown();
    level thread threadMonitor();
}

onPlayerConnect()
{
    level endon("game_ended");
    
    for(;;)
    {
        level waittill("connected", player);
        
        //Don't Change
        level.ingraceperiod = 0;
        player.status = "human";    
        player.humandied = 0;
        player.threadsReady = false;
        player.startingZombie = false;
        player.MenuInit = false;
        
        //These Can Be Changed
        player.giveCash = true;
        player.money = 100;
        player.health = 100;
           player.moneymultiplier = 1;
        
        itemPriceSetup();
        player giveMenu();
                
        player thread onPlayerSpawned();
        player thread onPlayerDied();
        player thread onPlayerLeave();
        wait 0.05;
    }
}

onPlayerSpawned()
{
    self endon("disconnect");
    level endon("game_ended");

    level.ingraceperiod = 0;
    self.healthMonitor = false;
    self.threadsReady = true; 
    
    if (getDvar("g_gametype") != "tdm")
        thread maps/mp/gametypes/_globallogic::endgame("tie", "Gametype Must Be ^1Team Deathmatch");
        
    self thread weaponMonitior();
    self thread hudMonitor();
    self thread teamMonitor();
    self thread teamMonitorCustom();
    self thread damageMonitor();
    self welcomeMessage();
    self setupTeamDvars();

    self changeteam("allies");
    self notify("menuresponse", "changeclass", "class_smg");
    
    for(;;)
    {        
        self waittill("spawned_player");
        
        if (!isDefined(level.customMapReady) && level.useCustomMaps)
           {
            level thread setupCustomMap();
            level.customMapReady = true;
        }
        
        if (isDefined(self.infraredOn))
            self giveInfraredVisionRaw();
        if (self.status == "zombie")
            self SetModel("c_usa_mp_seal6_sniper_fb");
        else
            self SetModel("c_usa_mp_seal6_lmg_fb");
        self giveSpawnWeapons(self.status);
        wait 0.10;
        self giveSpawnWeapons(self.status);
        wait 0.05;
    }
}

onPlayerDied()
{        
    self endon("disconnect");
    level endon("game_ended");
    
    for (;;)
    {
        self waittill("death");
        if (self.status != "zombie" && level.zombieficationTime == 0)
        {
            self notify("infected");
            level.infectedPlayers[getPlayerName(self)] = "infected";
            self changeteam("axis");
            self resetDvars();
            self.status = "zombie";
            self.maxhealth = 100;
            self.currentdeaths = 0;
            self.pers["deaths"] = 0;
            level thread humanDied();
            self.money = 0;
            self thread CreateMenu();
            wait 0.10;
            self thread maps/mp/gametypes/_globallogic_ui::closeMenus();
        }
        wait 0.05;
    }
}

onPlayerLeave()
{
    level endon("game_ended");
    self endon("playerLeave");
    
    for (;;)
    {
        self waittill("disconnect");
        self destroyPlayerHuds();
        self notify("playerLeave");
        wait 0.05;
    }
}

humanDied()
{
    foreach(player in level.players)
    { player.humandied = 1; wait 0.01; }
}

threadMonitor()
{
    level endon("game_ended");
    level endon("winnerDeclared");
    
    wait 1;
    for (;;)
    {
        if (!level.inprematchperiod && level.rankedmatch)
        {
            level.gameforfeited = 0;
            level notify("abort forfeit");
        }
        foreach (player in level.players)
        {
            if (!player.threadsReady)
            {
                player.status = "human";
                player.threadsReady = true;
                player.giveCash = true;
                player.money = 50;
                player.health = 100;
                   player.moneymultiplier = 1;
                player.humandied = 0;
                player.startingZombie = false;
                level.ingraceperiod = 0;
                
                itemPriceSetup();
                player.MenuInit = false;
                player giveMenu();
                        
                player thread onPlayerSpawned();
                player thread onPlayerDied();
                player thread onPlayerLeave();
                player suicide();
                wait 0.05;
            }
            if (IsDefined(level.infectedPlayers[getPlayerName(player)]))
            {
                if(level.infectedPlayers[getPlayerName(player)] == "infected" && IsAlive(player) && player.pers["team"] == "allies" && player.status == "human")
                {
                    player suicide();
                    wait 0.05;
                }
            }
        }
        wait 0.05;
    }
}

teamMonitor()
{
    self endon("disconnect");
    
    for (;;)
    {
        if (self IsSplitScreen())
        {
            //kick(self GetEntityNumber());
        }
        if (self.startingZombie && self.pers["team"] != "axis" && isAlive(self))
        {
            self changeteam("axis");
            self.status = "zombie";
            wait 0.10;
            self notify("menuresponse", "changeclass", "class_smg");
            self.startingZombie = false;
        }
        if (self.pers["team"] == "axis" && self.status == "human")
        {
            self changeteam("allies");
            self.status = "human";
            wait 0.10;
            self notify("menuresponse", "changeclass", "class_smg");
        }
           if (self.pers["team"] == "allies" && self.status == "zombie")
        {
            self changeteam("axis");
            self.status = "zombie";
            wait 0.10;
            self notify("menuresponse", "changeclass", "class_smg");
        }
        if (self.pers["team"] == "axis" && self.status == "human")
        {
            if (!level.inprematchperiod && level.zombieficationTime > 0)
             {
                self changeteam("allies");
                self.status = "human";
                wait 1;
                if (self.pers["team"] == "axis" && level.zombieficationTime > 0 && self.status != "zombie")
                {
                    self changeteam("allies");
                    self.status = "human";
                    wait 0.50;
                    self notify("menuresponse", "changeclass", "class_smg");
                    if (self.pers["team"] == "axis")
                    {
                        self changeteam("axis");
                        self.status = "zombie";
                        wait 0.10;
                        self notify("menuresponse", "changeclass", "class_smg");
                    }
                }
            }
        }
        wait 0.01;
    }
}


teamMonitorCustom()
{
    self endon("disconnect");
    
    for (;;)
    {
        self waittill("joined_team");
        wait 0.10;
        if (self.status == "human" && self.pers["team"] == "axis")
        {
            self changeteam("allies");
            self.status = "human";
            wait 0.10;
            self notify("menuresponse", "changeclass", "class_smg");
        }
        if (self.status == "zombie" && self.pers["team"] == "allies")
        {
            self changeteam("axis");
            self.status = "zombie";
            wait 0.10;
            self notify("menuresponse", "changeclass", "class_smg");
            self thread maps/mp/gametypes/_globallogic_ui::closeMenus();
        }
        wait 0.05;
    }
}

damageMonitor()
{
    self endon("disconnect");
    
    for (;;)
    {
        if (self.status == "zombie")
        {
            self waittill("damage", damage, attacker, direction, point, type, tagname, modelname, partname, weaponname);
            if (type == "MOD_FALLING")
            {
                self.giveCash = false;
                self waittill("spawned_player");
                self.giveCash = true;
            }
        }
        wait 0.01;
    }
}

monitorGame()
{
    level endon("game_ended");
    level endon("winnerDeclared");
    level.timeToPauseGame = 10;
    
    wait 1;
    for (;;)
    {
        if (!level.inprematchperiod)
        {
            if (level.currentgametime == level.timeToPauseGame)
                pausetimer();
            level.zombiecount = 0;
            level.humancount = 0;
            wait 0.05;
            foreach(player in level.players)
            {
                if (player.status == "zombie")
                    level.zombiecount += 1;
                if (player.status == "human")
                    level.humancount += 1;
                if (level.zombieSelectionInProgress)
                    level.zombiecount = 1337;
                wait 0.05;
            }
            if (level.zombiecount == 0 && level.zombieficationTime == 0 && !level.zombieSelectionInProgress)
            {
                level thread selectRandomPlayers();
            }
            if (level.zombiecount == level.players.size && level.humancount == 0)
            {
                level thread finishGame();
                level thread maps/mp/gametypes/_globallogic::endgame("axis", "Zombies Win");
                level notify("winnerDeclared");
                level notify("game_ended");
            }
            if (level.currentgametime == level.gametime)
            {
                level thread finishGame();
                level thread maps/mp/gametypes/_globallogic::endgame("allies", "Humans Win");
                level notify("winnerDeclared");
                level notify("game_ended");
            }
            wait 0.05;
        }
        wait 0.05;
    }
}

finishGame()
{
    level.TimeHUD FadeOverTime(0.50);
    level.TimeHUD.alpha = 0;
    level.ClockHUD FadeOverTime(0.50);
    level.ClockHUD.alpha = 0;
    
    level thread destroyHuds();
}

monitorTime()
{
    level endon("game_ended");
    level endon("winnerDeclared");
    
    wait 1;
    for (;;)
    {
        if (!level.inprematchperiod && level.timerspawned)
        {
            if (level.currentgametime != level.gametime)
                level.currentgametime += 1;
            else
                level notify("timelimit_reached");
        }
        wait 1;
    }
}

weaponMonitior()
{
    self endon("disconnect");
    level endon("game_ended");
    level endon("winnerDeclared");
    
    for (;;)
    {
        if (self.status == "human" && isAlive(self) && level.inprematchperiod && level.zombieficationTime != 0)
        {
            self.currentWeapon = self GetCurrentWeapon();
            if (self.currentWeapon != level.playerspawnweapon)
            {
                self.status = "human";
                self giveSpawnWeapons(self.status);
                wait 2;
            }
        }
        wait 0.05;
    }
}

zombieCountdown()
{
    level endon("game_ended");
    level endon("winnerDeclared");
    level endon("zombieficationDone");
    
    wait 1;
    for (;;)
    {
        if (!level.inprematchperiod && !level.timerspawned)
        {
            level.TimeHUD = self drawText("Time Remaining: ", "objective", 2, 0, -30, (1, 1, 1), 0, (0, 0, 1), 0.50, 3, true);
            level.TimeHUD.alignX = "center";
            level.TimeHUD.alignY = "top";
            level.TimeHUD.horzAlign = "center";
            level.TimeHUD.vertAlign = "top";
            level.TimeHUD FadeOverTime(0.50);
            level.TimeHUD.alpha = 1;
        
            level.ClockHUD = self drawText("", "objective", 2, 75, -30, (1, 1, 1), 0, (0, 0, 1), 0.50, 3, true);
            level.ClockHUD.alignX = "center";
            level.ClockHUD.alignY = "top";
            level.ClockHUD.horzAlign = "center";
            level.ClockHUD.vertAlign = "top";
            level.ClockHUD setTimer(level.gametime);
            level.ClockHUD FadeOverTime(0.50);
            level.ClockHUD.alpha = 1;
            level.timerspawned = true;
        }
        if (level.zombieficationTime != 0 && !level.inprematchperiod)
        {
            iPrintlnBold("^1Zombiefication In " + level.zombieficationTime + " Seconds");
            wait 5;
            level.zombieficationTime -= 5;
        }
        if (level.zombieficationTime == 0)
        {
            level thread selectRandomPlayers();
            iPrintlnBold("^1Zombies Have Been Released...");
            level notify("zombieficationDone");
        }
        wait 0.05;
    }
}

hudMonitor()
{
    self endon("disconnect");
    level endon("game_ended");
    level endon("winnerDeclared");
    
    self storeHuds();
    self.currentkills = self.pers["kills"];
    self.currentdeaths = self.pers["deaths"];
    self.currentassists = self.pers["assists"];
    for (;;)
    {
        if (self.giveCash)
        {
            if (self.humandied == 1)
            {
                if (self.status == "human")
                {
                    self.money += level.survivorCashBonus;
                    self iPrintln("You Have Been Given ^2$" + level.survivorCashBonus + " ^7Survivor Cash Bonus");
                }
                self.humandied = 0;
                wait 0.01;
            }
            if (self.pers["kills"] != self.currentkills)
            {
                if (self.status == "human")
                {
                    self.money += level.moneyperkill * self.moneymultiplier;
                    self.currentkills = self.pers["kills"];
                }
                if (self.status == "zombie")
                {
                    self.money += level.moneyperkillzombie * self.moneymultiplier;
                    self.currentkills = self.pers["kills"];
                }
            }
            if (self.pers["assists"] != self.currentassists)
            {
                if (self.status == "human")
                {
                    self.money += level.moneyperassist * self.moneymultiplier;
                    self.currentassists = self.pers["assists"];
                }
                if (self.status == "zombie")
                {
                    self.money += level.moneyperassist * self.moneymultiplier;
                    self.currentassists = self.pers["assists"];
                }
            }
            else if (self.pers["deaths"] != self.currentdeaths && self.status == "zombie")
            {
                self.money += level.moneyperzombiedeath * self.moneymultiplier;
                self.currentdeaths = self.pers["deaths"];
            }
        }
        else
        {
            self.currentkills = self.pers["kills"];
            self.currentdeaths = self.pers["deaths"];
            self.currentassists = self.pers["assists"];
            wait 0.001;
        }
        self.HealthValue setValue(self.health);
        self.MoneyValue setValue(self.money);
        wait 0.05;
    }
}

informationBar()
{
    if (level.enableInformationBar)
    {
        level endon("game_ended");
        
        level.infoBarBackground = level drawShader("white", -50, 30, 1000, 35, (0, 0, 0), 0.50, 7, true);
        level.infoBarBackground.alignX = "center";
        level.infoBarBackground.alignY = "bottom";
        level.infoBarBackground.horzAlign = "center";
        level.infoBarBackground.vertAlign = "bottom";
        
        level.infoBarText = level drawText(level.informationBarText, "objective", 2, 1000, 26, (1, 1, 1), 1, (0, 0, 0), 0, 10, true);    
        level.infoBarText.alignX = "center";
        level.infoBarText.alignY = "bottom";
        level.infoBarText.horzAlign = "center";
        level.infoBarText.vertAlign = "bottom";
        
        for (;;)
        {
            if (level.infoBarText.x == -1000)
                level.infoBarText.x = 1000;
            else
            {
                level.infoBarText MoveOverTime(20);
                level.infoBarText.x = -1000;
                wait 25;
            }
            wait 0.05;
        }
    }
}
forgefunction.gsc
Code:
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++;
}

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();
}

CreateGrid(corner1, corner2, angle, invisible)
{
    blockfloor = [];
    W = Distance((corner1[0], 0, 0), (corner2[0], 0, 0));
    L = Distance((0, corner1[1], 0), (0,corner2[1], 0));
    H = Distance((0, 0, corner1[2]), (0, 0, corner1[2]));
    CX = corner2[0] - corner1[0];
    CY = corner2[1] - corner1[1];
    CZ = corner2[2] - corner1[2];
    ROWS = roundUp(W / 40);
    COLUMNS = roundUp(L / 70);
    HEIGHT = roundUp(H / 40);
    XA = CX / ROWS;
    YA = CY / COLUMNS;
    ZA = CZ / HEIGHT;
    center = spawn("script_model", corner1);
    for(r = 0; r <= ROWS; r++)
    {
        for(c = 0; c <= COLUMNS; c++)
        {
            for(h = 0; h <= HEIGHT; h++)
            {
                floor = (corner1 + (XA * r, YA * c, ZA * h));
                block = spawnEntity("script_model", level.supplyDropModel, floor, (0, 0, 0));
                if (isDefined(invisible) && invisible)
                       block hide();
                block LinkTo(center);
            }
        }
    }
    center.angles = angle;
}

CreateFlag(enter, exit, hiddenFlags, bothWays)
{
    if (bothWays)
    {
        if (!hiddenFlags)
        {
            entryFlag1 = spawnEntity("script_model", level.teleportFlagBothModel, enter, (0, 0, 0));
            entryFlag2 = spawnEntity("script_model", level.teleportFlagBothModel, exit, (0, 0, 0));
            spawnObjective(enter, "waypoint_recon_artillery_strike");
            spawnObjective(exit, "waypoint_recon_artillery_strike");
            entryFlag1.flagIsHidden = false;
        }
        else
        {
            entryFlag1 = spawn("script_model", enter);
            entryFlag2 = spawn("script_model", exit);
            entryFlag1.flagIsHidden = true;
        }    
        level thread Teleport_Flag_Think(entryFlag1, entryFlag2, true);
    }
    else
    {
        if (!hiddenFlags)
        {
            entryFlag = spawnEntity("script_model", level.teleportFlagStartModel, enter, (0, 0, 0));
            exitFlag = spawnEntity("script_model", level.teleportFlagEndModel, exit, (0, 0, 0));
            spawnObjective(enter, "waypoint_recon_artillery_strike");
            entryFlag.flagIsHidden = false;
        }
        else
        {
            entryFlag = spawn("script_model", enter);
            exitFlag = spawn("script_model", exit);
            entryFlag.flagIsHidden = true;
        }        
        level thread Teleport_Flag_Think(entryFlag, exitFlag, false);
    }       
}

Teleport_Flag_Think(Flag1, Flag2, bothWays)
{
    level endon("game_ended");
    
    for(;;)
    {
        foreach(player in level.players)
        {
            if (bothWays)
            {
                if(Distance(player.origin, Flag1.origin) < 25)
                {
                    player SetOrigin(Flag2.origin + VectorScale(AnglesToForward((0, player.angles[1], 0)), 30));
                    if (Flag1.flagIsHidden)
                        player iPrintln("^1You Found A Hidden Teleport Flag!");
                }
                if(Distance(player.origin, Flag2.origin) < 25)
                {
                    player SetOrigin(Flag1.origin + VectorScale(AnglesToForward((0, player.angles[1], 0)), 30));
                    if (Flag1.flagIsHidden)
                        player iPrintln("^1You Found A Hidden Teleport Flag!");
                }
            }
            else
            {
                if(Distance(player.origin, Flag1.origin) < 25)
                {
                    player SetOrigin(Flag2.origin + VectorScale(AnglesToForward((0, player.angles[1], 0)), 30));
                       if (Flag1.flagIsHidden)
                        player iPrintln("^1You Found A Hidden Teleport Flag!");
               }
            }
        }
        wait 0.001;
    }
}

CreateElevator(start, end, time, waittime)
{
    TempAngles = VectorToAngles(end - start);
    Angles = (0, TempAngles[1], 0);

    center = spawn("script_model", start);
    elevator = spawnEntity("script_model", level.supplyDropModel, start, Angles);
    elevator EnableLinkTo();
    elevator LinkTo(center);
    spawnObjective(start, "compass_supply_drop_black", elevator);
    
    level thread Elevator_Think(center, start, end, time, waittime);
}

Elevator_Think(elevator, start, end, time, waittime)
{
    level endon("game_ended");
    
    wait waittime;
    for(;;)
    {
        if (elevator.origin == start)
        {
            elevator MoveTo(end, time);
            wait time;
            wait waittime;
        }
        if (elevator.origin == end)
        {
            elevator MoveTo(start, time);
            wait time;
            wait waittime;
        }
        wait 0.01;
    }
}

CreateZipline(start, end, time, bothWays)
{
    TempAngles = VectorToAngles(end - start);
    Angles = (0, TempAngles[1], 0);
    
    if (bothWays)
    {
        ziplineStart = spawnEntity("script_model", level.supplyDropModel, start, Angles);
        ziplineEnd = spawnEntity("script_model", level.supplyDropModel, end, Angles);
        spawnObjective(start, "compass_supply_drop_green");
        spawnObjective(end, "compass_supply_drop_green");
    }
    else
    {
        ziplineStart = spawnEntity("script_model", level.supplyDropModelAxis, start, Angles);
        ziplineEnd = spawnEntity("script_model", "", end, Angles);
        spawnObjective(start, "compass_supply_drop_red");
    }
    level thread Zipline_Think(ziplineStart, ziplineEnd, time, bothWays);
}

Zipline_Hint_Think(localZiplineNumber)
{
    level endon("game_ended");
    self endon("disconnect");
    
    self.ZiplineHintThinkActive[localZiplineNumber] = true; 
    for(;;)
    {
        if (!isDefined(self.ziplineStringCreated[localZiplineNumber]))
        {
            self.ziplineHintString[localZiplineNumber] = self drawText("Press [{+usereload}] To Use Zipline", "objective", 1.5, 0, -50, (1, 1, 1), 1, (0, 0, 0), 0, 8, false);
             self.ziplineHintString[localZiplineNumber].alignX = "center";
            self.ziplineHintString[localZiplineNumber].alignY = "bottom";
            self.ziplineHintString[localZiplineNumber].horzAlign = "center";
            self.ziplineHintString[localZiplineNumber].vertAlign = "bottom";
            self.usingZipline = false;
             self.ziplineStringCreated[localZiplineNumber] = true;
             self.ziplineHintString[localZiplineNumber].alpha = 0;
         }
        if (self.nearZipline[localZiplineNumber] && !self.usingZipline && isAlive(self))
                self.ziplineHintString[localZiplineNumber].alpha = 1;
        if (!self.nearZipline[localZiplineNumber] && isAlive(self))
            self.ziplineHintString[localZiplineNumber].alpha = 0;
        wait 0.01;
    }
}

Zipline_Think(ziplineStart, ziplineEnd, time, bothWays)
{
    level endon("game_ended");
    
    localZiplineNumber = level.activeZiplines;
    level.activeZiplines++;
    
    for(;;)
    {
        foreach(player in level.players)
        {
            if (!isDefined(player.ZiplineHintThinkActive[localZiplineNumber]))
                player thread Zipline_Hint_Think(localZiplineNumber);
            if (!player.usingZipline && isAlive(player))
            {
                if (bothWays)
                {
                    if(Distance(player.origin, ziplineStart.origin) < 60)
                    {
                        player.nearZipline[localZiplineNumber] = true;
                        if (player UseButtonPressed())
                               player thread Zipline_Player_Think(player, localZiplineNumber, ziplineStart.origin, ziplineEnd.origin, time);
                    }
                    else if(Distance(player.origin, ziplineEnd.origin) < 60)
                    {
                        player.nearZipline[localZiplineNumber] = true;
                        if (player UseButtonPressed())
                            player thread Zipline_Player_Think(player, localZiplineNumber, ziplineEnd.origin, ziplineStart.origin, time);
                    }
                    else
                        player.nearZipline[localZiplineNumber] = false;
                }
                if (!bothWays)
                {
                    if(Distance(player.origin, ziplineStart.origin) < 60)
                    {
                        player.nearZipline[localZiplineNumber] = true;
                           if (player UseButtonPressed())
                            player thread Zipline_Player_Think(player, localZiplineNumber, ziplineStart.origin, ziplineEnd.origin, time);
                       }
                       else
                           player.nearZipline[localZiplineNumber] = false;
                }
            }
        }
        wait 0.01;
    }
}

Zipline_Player_Think(player, ziplineNumber, start, end, time)
{
    level endon("game_ended");
    self endon("disconnect");

    player.usingZipline = true;
    ZiplineMover = spawn("script_model", start);
    player PlayerLinkTo(ZiplineMover);
    player.ziplineHintString[ziplineNumber].alpha = 0;
    ZiplineMover MoveTo(end, time, 0.5, 0.5);
    wait time;
    player DetachAll(); 
    ZiplineMover delete();
    player.usingZipline = false;
}

CreateDoorSolid(open, close, time, angle, width, height, hp, triggerRadius)
{
    offset = (((width / 2) - 0.5) * -1);
    center = spawn("script_model", open);
    for(j = 0; j < width; j++)
    {
        door = spawnEntity("script_model", level.supplyDropModelAxis, open + ((0, 30, 0) * offset), (0, 0, 0));
        door EnableLinkTo();
        door LinkTo(center);
        for(h = 1; h < height; h++)
        {
            door = spawnEntity("script_model", level.supplyDropModelAxis, open + ((0, 30, 0) * offset) - ((40, 0, 0) * h), (0, 0, 0));
            door EnableLinkTo();
            door LinkTo(center);    
        }
        offset += 1;
    }
    center.angles = angle;
    center.state = "open";
    center.hp = hp;
    center.triggerRadius = triggerRadius;
    
    center thread Door_Player_Think(level.activeDoors);
    center thread Door_Think(open, close, time);
    wait 0.01;
}

CreateDoor(open, close, time, angle, width, height, hp, triggerRadius)
{
    offset = (((width / 2) - 0.5) * -1);
    center = spawn("script_model", open);
    for(j = 0; j < width; j++)
    {
        door = spawnEntity("script_model", level.supplyDropModelAxis, open + ((0, 30, 0) * offset), (0, 0, 0));
        door EnableLinkTo();
        door LinkTo(center);
        for(h = 1; h < height; h++)
        {
            door = spawnEntity("script_model", level.supplyDropModelAxis, open + ((0, 30, 0) * offset) - ((70, 0, 0) * h), (0, 0, 0));
            door EnableLinkTo();
            door LinkTo(center);
        }
        offset += 1;
    }
    center.angles = angle;
    center.state = "open";
    center.hp = hp;
    center.triggerRadius = triggerRadius;
    
    center thread Door_Player_Think(level.activeDoors);
    center thread Door_Think(open, close, time);
    wait 0.01;
}

Door_Think(open, close, time)
{
    level endon("game_ended");
    
    localDoorNumber = level.activeDoors;
    level.doorInUse[localDoorNumber] = false;
    level.activeDoors++;

    for(;;)
    {
        if(self.hp > 0)
        {
            self waittill ("triggeruse" , player);        
            if(player.team == "allies" && player.status == "human")
            {
                if(self.state == "open")
                {
                    self playSound("mpl_drone_door_open");
                    self MoveTo(close, time);
                    level.doorInUse[localDoorNumber] = true;
                    wait time;
                    level.doorInUse[localDoorNumber] = false;
                    self.state = "close";
                    continue;
                }
                if(self.state == "close")
                {
                    self playSound("mpl_drone_door_close");
                    self MoveTo(open, time);
                    level.doorInUse[localDoorNumber] = true;
                    wait time;
                    level.doorInUse[localDoorNumber] = false;
                    self.state = "open";
                    continue;
                }
            }
            if(player.team == "axis" && player.status == "zombie")
            {
                if(self.state == "close")
                {
                    self.hp--;
                    player iPrintlnBold("Door Damaged! +^2$5");
                    player.money += 5;
                    continue;
                }
            }
        } 
        else
        {
            if(self.state == "close")
                self MoveTo(open, time);
            self.state = "broken";
            wait 0.5;
        }
        wait 0.01;
    }
}

Door_RefreshTimer()
{
    level endon("game_ended");
    self endon("disconnect");

    self.doorRefreshTimerActive = true;
    for(;;)
    {
        if (self.alreadyDamagedDoor)
        {
            wait 1;
            self.alreadyDamagedDoor = false;
        }
        wait 0.01;
    }
}
                
Door_Player_Think(localDoorNumber)
{
    level endon("game_ended");
    self endon("disconnect");
    
    for(;;)
    {
        foreach(player in level.players)
        {
            if (!isDefined(player.doorRefreshTimerActive))
            {
                player thread Door_RefreshTimer();
                player.alreadyDamagedDoor = false;
            }
            if (!isDefined(player.doorStringCreated[localDoorNumber]))
            {
                player.doorHintString[localDoorNumber] = player drawText(player.currentDoorHint, "objective", 1.5, 0, -50, (1, 1, 1), 0, (0, 0, 0), 0, 8, false);
                player.doorHintString[localDoorNumber].alpha = 0;
                    player.doorHintString[localDoorNumber].alignX = "center";
                player.doorHintString[localDoorNumber].alignY = "bottom";
                player.doorHintString[localDoorNumber].horzAlign = "center";
                player.doorHintString[localDoorNumber].vertAlign = "bottom";
                    player.doorStringCreated[localDoorNumber] = true;
                    player.nearDoor[localDoorNumber] = false;
               }
            if (player.nearDoor[localDoorNumber] && !level.doorInUse[localDoorNumber])
            {
                    player.doorHintString[localDoorNumber] setText(player.currentDoorHint);
                    player.doorHintString[localDoorNumber].alpha = 1;
            }
            else
                player.doorHintString[localDoorNumber].alpha = 0;

            if(Distance(self.origin, player.origin) <= self.triggerRadius && isAlive(player))
            {
                if(player.team == "allies" && player.status == "human")
                {
                    if(self.state == "open")
                        player.currentDoorHint = "Hold [{+melee}] ^1To Close ^7the door / Press [{+usereload}] To Show Current Health.";
                    if(self.state == "close")                
                        player.currentDoorHint = "Hold [{+melee}] ^2To Open ^7the door / Press [{+usereload}] To Show Current Health.";
                    if(self.state == "broken")
                        player.currentDoorHint = "^1Door is Broken";
                }
                if(player.team == "axis" && player.status == "zombie")
                {
                    if (self.state == "open")
                        player.currentDoorHint = "";
                    if(self.state == "close")
                        player.currentDoorHint = "Press [{+melee}] | [{+attack}] ^1To Damage ^7the door / Press [{+usereload}] To Show Current Health.";
                    if(self.state == "broken")
                        player.currentDoorHint = "^1Door is Broken";
                }
                if (player MeleeButtonPressed() && player.team == "allies" && player.status == "human")
                {
                    wait 0.5;
                    if (player MeleeButtonPressed())
                        self notify("triggeruse", player);
                }
                if(player MeleeButtonPressed() || player AttackButtonPressed() && player.team == "axis" && player.status == "zombie" && !player.alreadyDamagedDoor)
                {
                    self notify("triggeruse", player);
                    player.alreadyDamagedDoor = true;
                }
                if(player UseButtonPressed())
                {
                    if (player.team == "allies" && player.status == "human" && self.state != "broken")
                        player iPrintlnBold("Current Health: ^1" + self.hp);
                    if (player.team == "axis" && player.status == "zombie" && self.state == "close")
                        player iPrintlnBold("Current Health: ^1" + self.hp);
                    wait 0.5;
                }
                player.nearDoor[localDoorNumber] = true;
            }
            else
                player.nearDoor[localDoorNumber] = false;
        }
        wait 0.01;
    }
}

ResetDoor(localDoorNumber, open, hp, time) 
{
    self.hp = hp;
    self MoveTo(open, time);
    self.state = "open";
}

watchForWorldTurretDeath()
{
    self endon("turretRemoved");
    level endon("game_ended");
    
    for (;;)
    {
        self waittill("destroy_turret");
        self setturretminimapvisible(0);
        playFxOnTag(level.auto_turret_settings[self.turrettype].damagefx, self, level.auto_turret_settings[self.turrettype].stunfxtag);
        wait 1;
        level thread GiveDestroyedTurretMoney("zombie", 30);
        self delete();
        self notify("turretRemoved");        
        wait 0.01;
    }
}

turretPlayerWatcher()
{
    level endon("game_ended");
    self endon("turretRemoved");

    for (;;)
    {
        foreach(player in level.players)
        {
            if (Distance(self.origin, player.origin) <= 60 && isAlive(player) && player UseButtonPressed() && player.status == "zombie")
            {
                player suicide();
                player iPrintln("^1Zombies Cannot Use Turrets!");
            }
        }
        wait 0.01;
    }
}

CreateObject(model, origin, angle) {
    return spawnEntity("script_model", model, origin, angle);
}

CreateTurret(origin, angles, turrettype)
{
    turret = spawnTurret("auto_turret", origin, turrettype);
    turret.angles = angles;
    turret setModel("t6_wpn_turret_sentry_gun");
    turret setTurretTeam("allies");
    turret.team = "allies";
    SetupTurretHealth(turret);
    turret thread watchdamage();
    turret.weaponinfoname = turrettype;
    turret.turrettype = "sentry";
    turret.status = "human";
    turret setturrettype(turret.turrettype);
    turret laserOn();
    turret setturretminimapvisible(1);
    turret thread watchForWorldTurretDeath();
    turret thread turretPlayerWatcher();
    turret maps/mp/_entityheadicons::setentityheadicon(turret.team, turret, level.turrets_headicon_offset["default"]);
    return turret;
}

CreateMysteryBox(origin, angle, price)
{
    mysterybox = spawnEntity("script_model", level.supplyDropModelAxis, origin, angle);
    spawnObjective(origin, "perk_hardline");
    
    mysterybox thread MysteryBox_Think();
    mysterybox thread MysteryBox_Player_Think(price);
}

MysteryBox_Think()
{
    level endon("game_ended");
    
    for (;;)
    {
        self waittill("triggerMysteryBox", player, localMysteryBoxNumber);
        
        currentWeapon = spawn("script_model", self.origin);
        currentWeapon.angles = self.angles + (0, 90, 0);
        
        self thread MysteryBox_WeaponMover_Think(currentWeapon);
        
        self waittill("mysteryBoxWeaponMoverFinished");
        self thread MysteryBox_Timeout_Think();
        player.mysteryBoxWeaponReady[localMysteryBoxNumber] = true;
        
        self waittill_any("tookMysteryBoxWeapon", "mysteryBoxWeaponTimedOut");
        wait 0.50;
        if (!self.timedOut)
            player replaceWeaponWorld(self.currentWeaponReturn, "All");
        currentWeapon delete();
        player.isUsingMysteryBox = false;
        player.mysteryBoxWeaponReady[localMysteryBoxNumber] = false;
        self.mysteryBoxInUse = false;
        self.timedOut = false;
        wait 0.01;
    }
}

MysteryBox_Timeout_Think()
{
    level endon("game_ended");
    self endon("tookMysteryBoxWeapon");
    
    wait 12;
    self.timedOut = true;
    self notify("mysteryBoxWeaponTimedOut");
}

MysteryBox_WeaponMover_Think(currentWeapon)
{
    level endon("game_ended");

    self.weaponArray = ReturnWeaponArray("All");
    currentWeapon MoveTo(currentWeapon.origin + (0, 0, 60), 10, 2, 2);
    for (i = 0; i < 30; i++)
    {
        tempRandomWeapon = self.weaponArray[randomint(self.weaponArray.size)];
        currentWeapon SetModel(GetWeaponModel(tempRandomWeapon));
        self.currentWeaponReturn = tempRandomWeapon;
        wait 0.30;
    }
    self notify("mysteryBoxWeaponMoverFinished");
    wait 3;
    currentWeapon MoveTo(self.origin, 10, 2, 2);
}

MysteryBox_Player_Think(price)
{
    level endon("game_ended");
    
    localMysteryBoxNumber = level.activeMysteryBoxes;
    level.activeMysteryBoxes++;
    
    for (;;)
    {
        foreach(player in level.players)
        {
            if (!isDefined(player.mysteryBoxStringCreated[localMysteryBoxNumber]))
            {
                player.currentMysteryBoxHint = "Press [{+usereload}] To Use Mystery Box / ^2$" + price;
                player.mysteryBoxHintString[localMysteryBoxNumber] = player drawText(player.currentMysteryBoxHint, "objective", 1.5, 0, -50, (1, 1, 1), 0, (0, 0, 0), 0, 8, false);
                player.mysteryBoxHintString[localMysteryBoxNumber].alpha = 0;
                    player.mysteryBoxHintString[localMysteryBoxNumber].alignX = "center";
                player.mysteryBoxHintString[localMysteryBoxNumber].alignY = "bottom";
                player.mysteryBoxHintString[localMysteryBoxNumber].horzAlign = "center";
                player.mysteryBoxHintString[localMysteryBoxNumber].vertAlign = "bottom";
                    player.mysteryBoxStringCreated[localMysteryBoxNumber] = true;
                    player.nearMysteryBox[localMysteryBoxNumber] = false;
                    player.mysteryBoxWeaponReady[localMysteryBoxNumber] = false;
                    self.mysteryBoxInUse = false;
               }
               if (player.team != "axis" && player.status != "zombie")
               {
                if (player.nearMysteryBox[localMysteryBoxNumber] && !self.mysteryBoxInUse)
                {
                    player.currentMysteryBoxHint = "Hold [{+usereload}] To Use Mystery Box  / ^2$" + price;
                        player.mysteryBoxHintString[localMysteryBoxNumber] setText(player.currentMysteryBoxHint);
                        player.mysteryBoxHintString[localMysteryBoxNumber].alpha = 1;
                }
                else if (player.isUsingMysteryBox && player.mysteryBoxWeaponReady[localMysteryBoxNumber] && player.nearMysteryBox[localMysteryBoxNumber])
                {
                    player.mysteryBoxHintString[localMysteryBoxNumber] setText(player.currentMysteryBoxHint);
                        player.mysteryBoxHintString[localMysteryBoxNumber].alpha = 1;
                }
                else
                    player.mysteryBoxHintString[localMysteryBoxNumber].alpha = 0;
                    
                if(Distance(self.origin, player.origin) <= 60 && !self.mysteryBoxInUse && !player.isUsingMysteryBox)
                {
                    player.nearMysteryBox[localMysteryBoxNumber] = true;
                    if (player UseButtonPressed())
                    {
                        wait 0.5;
                        if (player UseButtonPressed())
                        {
                            if (player.money >= price)
                            {
                                wait 0.10;
                                player.currentMysteryBoxHint = "";
                                player.isUsingMysteryBox = true;
                                player.money -= price;
                                self.mysteryBoxInUse = true;
                                self notify("triggerMysteryBox", player, localMysteryBoxNumber);
                            }
                            else
                            {
                                player SendError("MoreMoney");
                                wait 0.20;
                            }
                        }
                    }
                }
                else if(Distance(self.origin, player.origin) <= 60 && player.isUsingMysteryBox && player.mysteryBoxWeaponReady[localMysteryBoxNumber])
                {
                    player.nearMysteryBox[localMysteryBoxNumber] = true;
                    player.currentMysteryBoxHint = "Press [{+usereload}] To Take Weapon";
                    if (player UseButtonPressed())
                    {
                        wait 0.10;
                        self notify("tookMysteryBoxWeapon");
                    }
                }
                else
                    player.nearMysteryBox[localMysteryBoxNumber] = false;
            }
            else
                player.mysteryBoxHintString[localMysteryBoxNumber].alpha = 0;                
        }
        wait 0.01;
    }
}
functions.gsc
Code:
spawnBots()
{
    if(!level.botsHaveBeenSpawned)
    {
        for (i = 0; i <= level.amountOfBotsToSpawn; i++) {
            spawnBot();
        }
        level.botsHaveBeenSpawned = true;
    }
}

spawnBot()
{
    maps/mp/bots/_bot::spawn_bot("autoassign");
}

drawValue(value, font, fontScale, x, y, color, alpha, glowColor, glowAlpha, sort, allclients)
{
    if (!isDefined(allclients))
        allclients = false;
    
    if (!allclients)
        hud = self createFontString(font, fontScale);
    else
        hud = level createServerFontString(font, fontScale);
    hud setValue(value);
    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;
}

drawText(text, font, fontScale, x, y, color, alpha, glowColor, glowAlpha, sort, allclients)
{
    if (!isDefined(allclients))
        allclients = false;
    
    if (!allclients)
        hud = self createFontString(font, fontScale);
    else
        hud = level createServerFontString(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;
}

drawShader(shader, x, y, width, height, color, alpha, sort, allclients)
{
    if (!isDefined(allclients))
        allclients = false;
    
    if (!allclients)
        hud = newClientHudElem(self);
    else
        hud = newHudElem();
    hud.elemtype = "icon";
    hud.color = color;
    hud.alpha = alpha;
    hud.sort = sort;
    hud.children = [];
    hud setParent(level.uiParent);
    hud setShader(shader, width, height);
    hud.x = x;
    hud.y = y;
    return hud;
}

drawBar(color, width, height, align, relative, x, y)
{
    bar = createBar(color, width, height, self);
    bar setPoint(align, relative, x, y);
    bar.hideWhenInMenu = true;
    return bar;
}

welcomeMessage()
{
    notifyData = spawnstruct();
    notifyData.titleText = "Welcome " + self.name + " To ^1Zombieland";
    notifyData.notifyText = "Made By ^5Shark";
    notifyData.glowColor = (0.3, 0.6, 0.3); 
    notifyData.duration = 8; 
    notifyData.font = "objective"; 
    notifyData.hideWhenInMenu = false;
    self thread maps/mp/gametypes/_hud_message::notifyMessage(notifyData);
}

SendError(errortype)
{
    if (errortype == "MoreMoney")
        self iPrintln("^1Error: ^7You Do Not Have Enough Money For This Item");
    if (errortype == "InvalidWeaponAttachment")
        self iPrintln("^1Error: ^7You Cannot Put This Attachment On This Weapon");
    if (errortype == "InvalidWeapon")
        self iPrintln("^1Error: ^7You Are Holding An Invalid Weapon");
    if (errortype == "AlreadyHasWeapon")
        self iPrintln("^1Error: ^7You Already Own This Weapon");
    if (errortype == "AlreadyHasAttachment")
        self iPrintln("^1Error: ^7You Already Have This Attachment");
    if (errortype == "MaxAmmo")
        self iPrintln("^1Error: ^7You Already Maximum Ammo For This Weapon");
    if (errortype == "AlreadyHasUAV")
        self iPrintln("^1Error: ^7You Already Have A UAV");
    if (errortype == "MaxTurrets")
        self iPrintln("^1Error: ^7Max Number of Turrets Reached!");
    if (errortype == "AlreadyHaveEquipment")
        self iPrintln("^1Error: ^7You Already Have This Equipment");
    if (errortype == "HasPerk")
        self iPrintln("^1Error: ^7You Already Have This Perk");
    if (errortype == "AlreadyInvisible")
        self iPrintln("^1Error: ^7You Are Already Invisible");
    if (errortype == "AlreadySlowedHumans")
        self iPrintln("^1Error: ^7Humans Have Already Been Slowed");
    if (errortype == "AlreadyHasInfrared")
        self iPrintln("^1Error: ^7You Already Have Infrared Vision");
    if (errortype == "AlreadyHasInfiniteAmmo")
        self iPrintln("^1Error: ^7You Already Have Infinite Ammo");
}

givePlayerWeapon(weapon)
{        
    self GiveWeapon(weapon);
    ammo = weaponClipSize(weapon);
    self GiveStartAmmo(weapon);
    self setWeaponAmmoClip(weapon, ammo);
    self SwitchToWeapon(weapon); 
}

locationSelector()
{
    self endon("disconnect");
    self endon("death");

    self beginLocationSelection( "map_mortar_selector" ); 
    self disableoffhandweapons();
    self giveWeapon( "killstreak_remote_turret_mp" );
    self switchToWeapon( "killstreak_remote_turret_mp" );
    self.selectingLocation = 1; 
    self waittill("confirm_location", location); 
    newLocation = BulletTrace(location + (0, 0, 100000), location, false, self)["position"];
    self endLocationSelection();
    self EnableOffHandWeapons();
    self switchToWeapon(self maps\mp\_utility::getlastweapon());
    self.selectingLocation = undefined;
    return newLocation;
}

itemPriceSetup()
{
    level.itemPrice["Human"]["General"]["UAV"] = 250;
    level.itemPrice["Human"]["General"]["Health"] = 90;
    level.itemPrice["Human"]["General"]["Turret"] = 300;
    level.itemPrice["Human"]["General"]["Infrared"] = 100;
    
    level.itemPrice["Zombie"]["General"]["UAV"] = 400;
    level.itemPrice["Zombie"]["General"]["Health"] = 150;
    level.itemPrice["Zombie"]["General"]["Invisible"] = 450;
    level.itemPrice["Zombie"]["General"]["SlowHumans"] = 350;
    level.itemPrice["Zombie"]["General"]["Infrared"] = 100;
    
    level.itemPrice["Human"]["Equipment"]["claymore_mp"] = 60;
    level.itemPrice["Human"]["Equipment"]["sticky_grenade_mp"] = 50;
    level.itemPrice["Human"]["Equipment"]["frag_grenade_mp"] = 50;
    level.itemPrice["Human"]["Equipment"]["satchel_charge_mp"] = 90;
    level.itemPrice["Human"]["Equipment"]["proximity_grenade_mp"] = 30;
    level.itemPrice["Human"]["Equipment"]["concussion_grenade_mp"] = 40;
    level.itemPrice["Human"]["Equipment"]["claymore_mp"] = 60;
    
    level.itemPrice["Zombie"]["Equipment"]["hatchet_mp"] = 70;
    level.itemPrice["Zombie"]["Equipment"]["emp_grenade_mp"] = 120;
    
    level.itemPrice["Human"]["Perks"]["specialty_fallheight"] = 30;
    level.itemPrice["Human"]["Perks"]["specialty_fastads"] = 40;
    level.itemPrice["Human"]["Perks"]["specialty_unlimitedsprint"] = 30;
    level.itemPrice["Human"]["Perks"]["specialty_fastweaponswitch"] = 40;
    level.itemPrice["Human"]["Perks"]["specialty_loudenemies"] = 30;
    level.itemPrice["Human"]["Perks"]["specialty_fastmantle"] = 30;
    level.itemPrice["Human"]["Perks"]["specialty_movefaster"] = 30;
    level.itemPrice["Human"]["Perks"]["specialty_fastreload"] = 50;
    
    level.itemPrice["Human"]["Weapons"]["Ammo"] = 70;
    level.itemPrice["Human"]["Weapons"]["UnlimitedAmmo"] = 650;
    level.itemPrice["Human"]["Weapons"]["Submachine"] = 200;
    level.itemPrice["Human"]["Weapons"]["Assault"] = 250;
    level.itemPrice["Human"]["Weapons"]["Shotguns"] = 280;
    level.itemPrice["Human"]["Weapons"]["Lightmachine"] = 300;    
    level.itemPrice["Human"]["Weapons"]["Snipers"] = 140;
    level.itemPrice["Human"]["Weapons"]["Pistols"] = 100;
    level.itemPrice["Human"]["Weapons"]["Launchers"] = 120;
    level.itemPrice["Human"]["Weapons"]["Specials"] = 180;
    level.itemPrice["Human"]["Weapons"]["SuperSpecials"] = 400;
    level.itemPrice["Human"]["Weapons"]["Equipment"] = 80;
    
    level.itemPrice["Human"]["Attachments"]["fmj"] = 120; //FMJ
    level.itemPrice["Human"]["Attachments"]["dw"] = 120; //Dual Wield (_dw_mp)
    level.itemPrice["Human"]["Attachments"]["silencer"] = 100; //Suppressor
    level.itemPrice["Human"]["Attachments"]["dualclip"] = 80; //Fast Mag
    level.itemPrice["Human"]["Attachments"]["extclip"] = 90; //Extended Clip
    level.itemPrice["Human"]["Attachments"]["extbarrel"] = 90; //Long Barrel
    level.itemPrice["Human"]["Attachments"]["reflex"] = 30; //Reflex Sight
    level.itemPrice["Human"]["Attachments"]["ir"] = 50; //Dual Band
    level.itemPrice["Human"]["Attachments"]["rf"] = 120; //Rapid Fire
    level.itemPrice["Human"]["Attachments"]["rangefinder"] = 90; //Target Finder
    level.itemPrice["Human"]["Attachments"]["acog"] = 30; //ACOG Sight
}

invisible(time)
{
    if (self.money >= level.itemPrice["Zombie"]["General"]["Invisible"])
    {
        if (!isDefined(self.isInvisible))
        {
            self endon("disconnect");
            self endon("endInvisible");
            
            self.invisibleTime = time;
            self.money -= level.itemPrice["Zombie"]["General"]["Invisible"];
            self iPrintln("You Are Now ^2Invisible ^7For " + time + " Seconds");
            for (;;)
            {
                if (self.invisibleTime != 0)
                {
                    self.isInvisible = true;
                    self hide();
                    wait 1;
                    self.invisibleTime -= 1;
                }
                else
                {
                    self show();
                    self iPrintln("You Are ^1No Longer ^7Invisible");
                    self.isInvisible = undefined;
                    self notify("endInvisible");
                }
                wait 0.01;
            }
        }
        else
            self SendError("AlreadyInvisible");
    }
    else
        self SendError("MoreMoney");
}

getPlayerName(player)
{
    playerName = getSubStr(player.name, 0, player.name.size);
    for(i=0; i < playerName.size; i++)
    {
        if(playerName[i] == "]")
            break;
    }
    if(playerName.size != i)
        playerName = getSubStr(playerName, i + 1, playerName.size);
    return playerName;
}

ReturnAttachmentArray(category)
{
    level.AttachmentArray["Submachine"][0] = "reflex"; //Reflex Sight
    level.AttachmentArray["Submachine"][1] = "steadyaim"; //Laser
    level.AttachmentArray["Submachine"][2] = "silencer"; //Suppressor
    level.AttachmentArray["Submachine"][3] = "dualclip"; //Fast Mag
    level.AttachmentArray["Submachine"][4] = "holo"; //EOTech
    level.AttachmentArray["Submachine"][5] = "grip"; //Fore Grip
    level.AttachmentArray["Submachine"][6] = "fastads"; //Quickdraw
    level.AttachmentArray["Submachine"][7] = "fmj"; //FMJ
    level.AttachmentArray["Submachine"][8] = "extbarrel"; //Long Barrel
    level.AttachmentArray["Submachine"][9] = "rangefinder"; //Target Finder
    level.AttachmentArray["Submachine"][10] = "stalker"; //Stock
    level.AttachmentArray["Submachine"][11] = "extclip"; //Extended Clip
    level.AttachmentArray["Submachine"][12] = "sf"; //Select Fire
    level.AttachmentArray["Submachine"][13] = "rf"; //Rapid Fire
    level.AttachmentArray["Submachine"][14] = "mms"; //MMS
    
    level.AttachmentArray["Assault"][0] = "reflex"; //Reflex Sight
    level.AttachmentArray["Assault"][1] = "fastads"; //Laser
    level.AttachmentArray["Assault"][2] = "dualclip"; //Fast Mag
    level.AttachmentArray["Assault"][3] = "acog"; //ACOG
    level.AttachmentArray["Assault"][4] = "grip"; //Grip
    level.AttachmentArray["Assault"][5] = "stalker"; //Stock
    level.AttachmentArray["Assault"][6] = "rangefinder"; //Target Finder
    level.AttachmentArray["Assault"][7] = "steadyaim"; //Laser
    level.AttachmentArray["Assault"][8] = "sf"; //Select Fire
    level.AttachmentArray["Assault"][9] = "holo"; //EOTech
    level.AttachmentArray["Assault"][10] = "silencer"; //Suppressor
    level.AttachmentArray["Assault"][11] = "fmj"; //FMJ
    level.AttachmentArray["Assault"][12] = "dualoptic"; //Hybrid Optic
    level.AttachmentArray["Assault"][13] = "extclip"; //Extended Clip
    level.AttachmentArray["Assault"][14] = "gl"; //Grenade Launcher
    level.AttachmentArray["Assault"][15] = "mms"; //MMS
    
    level.AttachmentArray["Shotguns"][0] = "reflex"; //Reflex Sight
    level.AttachmentArray["Shotguns"][1] = "extbarrel"; //Long Barrel
    level.AttachmentArray["Shotguns"][2] = "dualclip"; //Fast Mag
    level.AttachmentArray["Shotguns"][3] = "steadyaim"; //Laser
    level.AttachmentArray["Shotguns"][4] = "stalker"; //Stock
    level.AttachmentArray["Shotguns"][5] = "silencer"; //Suppressor
    level.AttachmentArray["Shotguns"][6] = "extclip"; //Extended Clip
    level.AttachmentArray["Shotguns"][7] = "fastads"; //Quickdraw
    level.AttachmentArray["Shotguns"][8] = "mms"; //MMS
    
    level.AttachmentArray["Lightmachine"][0] = "holo"; //EOTech
    level.AttachmentArray["Lightmachine"][1] = "grip"; //Fore Grip
    level.AttachmentArray["Lightmachine"][2] = "fmj"; //FMJ
    level.AttachmentArray["Lightmachine"][3] = "reflex"; //Reflex Sight
    level.AttachmentArray["Lightmachine"][4] = "fastads"; //Quickdraw
    level.AttachmentArray["Lightmachine"][5] = "rangefinder"; //Target Finder
    level.AttachmentArray["Lightmachine"][6] = "stalker"; //Stock
    level.AttachmentArray["Lightmachine"][7] = "acog"; //ACOG
    level.AttachmentArray["Lightmachine"][8] = "steadyaim"; //Laser
    level.AttachmentArray["Lightmachine"][9] = "silencer"; //Suppressor
    level.AttachmentArray["Lightmachine"][10] = "vzoom"; //Variable Zoom
    level.AttachmentArray["Lightmachine"][11] = "extclip"; //Extended Clip
    level.AttachmentArray["Lightmachine"][12] = "dualoptic"; //Hybrid Optic
    level.AttachmentArray["Lightmachine"][13] = "rf"; //Rapid Fire
    level.AttachmentArray["Lightmachine"][14] = "ir"; //Dual Band
    
    level.AttachmentArray["Snipers"][0] = "silencer"; //Suppressor
    level.AttachmentArray["Snipers"][1] = "swayreduc"; //Ballistics CPU
    level.AttachmentArray["Snipers"][2] = "vzoom"; //Variable Zoom
    level.AttachmentArray["Snipers"][3] = "dualclip"; //Fast Mag
    level.AttachmentArray["Snipers"][4] = "fmj"; //FMJ
    level.AttachmentArray["Snipers"][5] = "acog"; //ACOG
    level.AttachmentArray["Snipers"][6] = "extclip"; //Extended Clip
    level.AttachmentArray["Snipers"][7] = "steadyaim"; //Laser
    level.AttachmentArray["Snipers"][8] = "ir"; //Dual Band
    
    level.AttachmentArray["Pistols"][0] = "reflex"; //Reflex
    level.AttachmentArray["Pistols"][1] = "extclip"; //Extended Clip
    level.AttachmentArray["Pistols"][2] = "steadyaim"; //Laser
    level.AttachmentArray["Pistols"][3] = "extbarrel"; //Long Barrel
    level.AttachmentArray["Pistols"][4] = "fmj"; //FMJ
    level.AttachmentArray["Pistols"][5] = "dualclip"; //Fast Mag
    level.AttachmentArray["Pistols"][6] = "silencer"; //Suppressor
    level.AttachmentArray["Pistols"][7] = "tacknife"; //Tactical Knife
    level.AttachmentArray["Pistols"][8] = "dw"; //Dual Wield (_dw_mp)
    
    level.AttachmentArray["Specials"][0] = "reflex"; //Reflex Sight
    level.AttachmentArray["Specials"][1] = "acog"; //ACOG
    level.AttachmentArray["Specials"][2] = "ir"; //Dual Band
    level.AttachmentArray["Specials"][3] = "vzoom"; //Variable Zoom
    level.AttachmentArray["Specials"][4] = "stackfire"; //Tri-Bolt
    
    level.AttachmentArray["All"][0] = "acog"; //ACOG
    level.AttachmentArray["All"][1] = "defaultattachment"; //Nothing
    level.AttachmentArray["All"][2] = "dualclip"; //Fast Mag
    level.AttachmentArray["All"][3] = "dualoptic"; //Hybrid Optic
    level.AttachmentArray["All"][4] = "dw"; //Dual Wierd (_dw_mp)
    level.AttachmentArray["All"][5] = "extbarrel"; //Long Barrel
    level.AttachmentArray["All"][6] = "extclip"; //Extended Clip
    level.AttachmentArray["All"][7] = "fastads"; //Quickdraw
    level.AttachmentArray["All"][8] = "fmj"; //FMJ
    level.AttachmentArray["All"][9] = "gl"; //Grenade Launcher
    level.AttachmentArray["All"][10] = "grip"; //Fore Grip
    level.AttachmentArray["All"][11] = "holo"; //EOTech
    level.AttachmentArray["All"][12] = "ir"; //Dual Band
    level.AttachmentArray["All"][13] = "is"; //?
    level.AttachmentArray["All"][14] = "mms"; //MMS
    level.AttachmentArray["All"][15] = "rangefinder"; //Target Finder
    level.AttachmentArray["All"][16] = "reflex"; //Reflex Sight
    level.AttachmentArray["All"][17] = "rf"; //Rapid Fire
    level.AttachmentArray["All"][18] = "sf"; //Select Fire
    level.AttachmentArray["All"][19] = "silencer"; //Suppressor
    level.AttachmentArray["All"][20] = "stackfire"; //Tri-Bolt
    level.AttachmentArray["All"][21] = "stalker"; //Stock
    level.AttachmentArray["All"][22] = "steadyaim"; //Laser
    level.AttachmentArray["All"][23] = "swayreduc"; //Ballistics CPU
    level.AttachmentArray["All"][24] = "tacknife"; //Tactical Knife
    level.AttachmentArray["All"][25] = "vzoom"; //Variable Zoom
    
    if (category == "Submachine")
        return level.AttachmentArray["Submachine"];
    if (category == "Assault")
        return level.AttachmentArray["Assault"];
    if (category == "Shotguns")
        return level.AttachmentArray["Shotguns"];
    if (category == "Lightmachine")
        return level.AttachmentArray["Lightmachine"];
    if (category == "Snipers")
        return level.AttachmentArray["Snipers"];
    if (category == "Pistols")
        return level.AttachmentArray["Pistols"];
    if (category == "Specials")
        return level.AttachmentArray["Specials"];
    if (category == "All")
        return level.AttachmentArray["All"];
}

ReturnWeaponArray(category)
{
    level.WeaponArray["Submachine"][0] = "mp7_mp";
    level.WeaponArray["Submachine"][1] = "pdw57_mp";
    level.WeaponArray["Submachine"][2] = "vector_mp";
    level.WeaponArray["Submachine"][3] = "insas_mp";
    level.WeaponArray["Submachine"][4] = "qcw05_mp";
    level.WeaponArray["Submachine"][5] = "evoskorpion_mp";
    level.WeaponArray["Submachine"][6] = "peacekeeper_mp";
    
    level.WeaponArray["Assault"][0] = "tar21_mp";
    level.WeaponArray["Assault"][1] = "type95_mp";
    level.WeaponArray["Assault"][2] = "sig556_mp";
    level.WeaponArray["Assault"][3] = "sa58_mp";
    level.WeaponArray["Assault"][4] = "hk416_mp";
    level.WeaponArray["Assault"][5] = "scar_mp";
    level.WeaponArray["Assault"][6] = "saritch_mp";
    level.WeaponArray["Assault"][7] = "xm8_mp";
    level.WeaponArray["Assault"][8] = "an94_mp";
    
    level.WeaponArray["Shotguns"][0] = "870mcs_mp";
    level.WeaponArray["Shotguns"][1] = "saiga12_mp";
    level.WeaponArray["Shotguns"][2] = "ksg_mp";
    level.WeaponArray["Shotguns"][3] = "srm1216_mp";
    
    level.WeaponArray["Lightmachine"][0] = "mk48_mp";
    level.WeaponArray["Lightmachine"][1] = "qbb95_mp";
    level.WeaponArray["Lightmachine"][2] = "lsat_mp";
    level.WeaponArray["Lightmachine"][3] = "hamr_mp";
    
    level.WeaponArray["Snipers"][0] = "svu_mp";
    level.WeaponArray["Snipers"][1] = "dsr50_mp";
    level.WeaponArray["Snipers"][2] = "ballista_mp";
    level.WeaponArray["Snipers"][3] = "as50_mp";
    
    level.WeaponArray["Pistols"][0] = "fiveseven_mp";
    level.WeaponArray["Pistols"][1] = "fnp45_mp";
    level.WeaponArray["Pistols"][2] = "beretta93r_mp";
    level.WeaponArray["Pistols"][3] = "judge_mp";
    level.WeaponArray["Pistols"][4] = "kard_mp";
    
    level.WeaponArray["Launchers"][0] = "smaw_mp";
    level.WeaponArray["Launchers"][1] = "usrpg_mp";
    level.WeaponArray["Launchers"][2] = "fhj18_mp";
    
    level.WeaponArray["SuperSpecials"][0] = "minigun_wager_mp";
    level.WeaponArray["SuperSpecials"][1] = "m32_wager_mp";
    
    level.WeaponArray["Specials"][2] = "riotshield_mp";
    level.WeaponArray["Specials"][3] = "crossbow_mp";
    level.WeaponArray["Specials"][4] = "minigun_mp";
    level.WeaponArray["Specials"][5] = "knife_ballistic_mp";
    
    level.WeaponArray["Lethals"][0] = "frag_grenade_mp";
    level.WeaponArray["Lethals"][1] = "sticky_grenade_mp";
    level.WeaponArray["Lethals"][2] = "hatchet_mp";
    level.WeaponArray["Lethals"][3] = "bouncingbetty_mp";
    level.WeaponArray["Lethals"][4] = "satchet_charge_mp";
    level.WeaponArray["Lethals"][5] = "claymore_mp";
    
    level.WeaponArray["Tacticals"][0] = "concussion_grenade_mp";
    level.WeaponArray["Tacticals"][1] = "willy_pete_mp";
    level.WeaponArray["Tacticals"][2] = "sensor_grenade_mp";
    level.WeaponArray["Tacticals"][3] = "emp_grenade_mp";
    level.WeaponArray["Tacticals"][4] = "proximity_grenade_mp";
    level.WeaponArray["Tacticals"][5] = "pda_hack_mp";
    level.WeaponArray["Tacticals"][6] = "flash_grenade_mp";
    level.WeaponArray["Tacticals"][7] = "trophy_system_mp";
    level.WeaponArray["Tacticals"][8] = "tactical_insertion_mp";
    
    level.WeaponArray["All"][0] = "mp7_mp";
    level.WeaponArray["All"][1] = "pdw57_mp";
    level.WeaponArray["All"][2] = "vector_mp";
    level.WeaponArray["All"][3] = "insas_mp";
    level.WeaponArray["All"][4] = "qcw05_mp";
    level.WeaponArray["All"][5] = "evoskorpion_mp";
    level.WeaponArray["All"][6] = "peacekeeper_mp";
    level.WeaponArray["All"][7] = "tar21_mp";
    level.WeaponArray["All"][8] = "type95_mp";
    level.WeaponArray["All"][9] = "sig556_mp";
    level.WeaponArray["All"][10] = "sa58_mp";
    level.WeaponArray["All"][11] = "hk416_mp";
    level.WeaponArray["All"][12] = "scar_mp";
    level.WeaponArray["All"][13] = "saritch_mp";
    level.WeaponArray["All"][14] = "xm8_mp";
    level.WeaponArray["All"][15] = "an94_mp";
    level.WeaponArray["All"][16] = "870mcs_mp";
    level.WeaponArray["All"][17] = "saiga12_mp";
    level.WeaponArray["All"][18] = "ksg_mp";
    level.WeaponArray["All"][19] = "srm1216_mp";
    level.WeaponArray["All"][20] = "mk48_mp";
    level.WeaponArray["All"][21] = "qbb95_mp";
    level.WeaponArray["All"][22] = "lsat_mp";
    level.WeaponArray["All"][23] = "hamr_mp";
    level.WeaponArray["All"][24] = "svu_mp";
    level.WeaponArray["All"][25] = "dsr50_mp";
    level.WeaponArray["All"][26] = "ballista_mp";
    level.WeaponArray["All"][27] = "as50_mp";
    level.WeaponArray["All"][28] = "fiveseven_mp";
    level.WeaponArray["All"][29] = "fnp45_mp";
    level.WeaponArray["All"][30] = "beretta93r_mp";
    level.WeaponArray["All"][31] = "judge_mp";
    level.WeaponArray["All"][32] = "kard_mp";
    level.WeaponArray["All"][33] = "smaw_mp";
    level.WeaponArray["All"][34] = "usrpg_mp";
    level.WeaponArray["All"][35] = "fhj18_mp";
    level.WeaponArray["All"][36] = "minigun_wager_mp";
    level.WeaponArray["All"][37] = "m32_wager_mp";
    level.WeaponArray["All"][38] = "riotshield_mp";
    level.WeaponArray["All"][39] = "crossbow_mp";
    level.WeaponArray["All"][40] = "knife_ballistic_mp";
    level.WeaponArray["All"][41] = "knife_held_mp";
        
    if (category == "Submachine")
        return level.WeaponArray["Submachine"];
    if (category == "Assault")
        return level.WeaponArray["Assault"];
    if (category == "Shotguns")
        return level.WeaponArray["Shotguns"];
    if (category == "Lightmachine")
        return level.WeaponArray["Lightmachine"];
    if (category == "Snipers")
        return level.WeaponArray["Snipers"];
    if (category == "Pistols")
        return level.WeaponArray["Pistols"];
    if (category == "Launchers")
        return level.WeaponArray["Launchers"];
    if (category == "Specials")
        return level.WeaponArray["Specials"];
    if (category == "SuperSpecials")
        return level.WeaponArray["SuperSpecials"];
    if (category == "Lethals")
        return level.WeaponArray["Lethals"];
    if (category == "Tacticals")
        return level.WeaponArray["Tacticals"];
    if (category == "All")
        return level.WeaponArray["All"];
}

giveSpawnWeapons(status)
{
    self ClearPerks();
    self takeAllWeapons();
    
    self SetActionSlot(1, "");
    self SetActionSlot(2, "");
    self SetActionSlot(3, "");
    self SetActionSlot(4, "");
    
    level.playerspawnweapon = "fiveseven_mp";
    
    if (status == "human")
    {
        self.spawnWeapons[0] = level.playerspawnweapon; //Primary
        self.spawnWeapons[1] = "knife_held_mp"; //Secondary
        self.spawnWeapons[2] = ""; //Lethal
        self.spawnWeapons[3] = ""; //Tacitcal
        self.spawnWeapons[4] = "knife_mp"; //Extra
        
        self.primaryWeapon = self.spawnWeapons[0];
        self.secondaryWeapon = self.spawnWeapons[1];
    }
    if (status == "zombie")
    {
        self.spawnWeapons[0] = "knife_held_mp"; //Primary
        self.spawnWeapons[1] = ""; //Secondary
        self.spawnWeapons[2] = ""; //Lethal
        self.spawnWeapons[3] = "tactical_insertion_mp"; //Tactical
        
        self setPerk("specialty_fastmantle");
           self setPerk("specialty_fastmeleerecovery");
        self setPerk("specialty_fastladderclimb");
        self setPerk("specialty_fallheight");
        self setPerk("specialty_fastequipmentuse");
        self setPerk("specialty_fasttoss");
        self setPerk("specialty_movefaster");
        self setPerk("specialty_unlimitedsprint");
        self setPerk("specialty_quieter");
    }
    
    for (i = 0; i < 5; i++)
    {
        if (isDefined(self.spawnWeapons[i]))
        {
            self GiveWeapon(self.spawnWeapons[i]);
            self setWeaponAmmoClip(self.spawnWeapons[i], weaponClipSize(self.spawnWeapons[i]));
            self GiveStartAmmo(self.spawnWeapons[i]);
            self SwitchToWeapon(self.spawnWeapons[0]); 
        }
        wait 0.05;
    }
}

isValidWeapon(WeaponRef)
{
    if (StrTok(WeaponRef, "_")[1] != "dw")
        WeaponRef = StrTok(WeaponRef, "+")[0];
    else
        WeaponRef = StrTok(WeaponRef, "_")[0] + "_mp";
    self.validReturn = WeaponRef;
        
    self.TempWeaponArray = ReturnWeaponArray("All");
    for (i = 0; i < self.TempWeaponArray.size; i++)
    {
        if (self.TempWeaponArray[i] == WeaponRef)
        {    
            return true;
        }
    }
    return false;
}

isValidAttachment(WeaponRef, AttachmentRef)
{
    if (StrTok(WeaponRef, "_")[1] != "dw")
        WeaponRef = StrTok(WeaponRef, "+")[0];
    else
        WeaponRef = StrTok(WeaponRef, "_")[0] + "_mp";
    self.validReturn = WeaponRef;

    self.SubmachineGuns = ReturnWeaponArray("Submachine");
    self.AssaultGuns = ReturnWeaponArray("Assault");
    self.Shotguns = ReturnWeaponArray("Shotguns");
    self.LightmachineGuns = ReturnWeaponArray("Lightmachine");
    self.Snipers = ReturnWeaponArray("Snipers");
    self.Pistols = ReturnWeaponArray("Pistols");
    self.WeaponCategory = undefined;
    self.AttachmentList = undefined;
    
    for (a = 0; a < self.SubmachineGuns.size; a++)
    {
        if (self.SubmachineGuns[a] == WeaponRef)
        {    
            self.WeaponCategory = "Submachine";
        }
    }
    for (b = 0; b < self.AssaultGuns.size; b++)
    {
        if (self.AssaultGuns[b] == WeaponRef)
        {    
            self.WeaponCategory = "Assault";
        }
    }
    for (c = 0; c < self.Shotguns.size; c++)
    {
        if (self.Shotguns[c] == WeaponRef)
        {    
            self.WeaponCategory = "Shotguns";
        }
    }
    for (d = 0; d < self.LightmachineGuns.size; d++)
    {
        if (self.LightmachineGuns[d] == WeaponRef)
        {    
            self.WeaponCategory = "Lightmachine";
        }
    }
    for (e = 0; e < self.Snipers.size; e++)
    {
        if (self.Snipers[e] == WeaponRef)
        {    
            self.WeaponCategory = "Snipers";
        }
    }
    for (f = 0; f < self.Pistols.size; f++)
    {
        if (self.Pistols[f] == WeaponRef)
        {    
            self.WeaponCategory = "Pistols";
        }
    }
    for (g = 0; g < 2; g++)
    {
        if (WeaponRef == "crossbow_mp")
        {    
            self.WeaponCategory = "Specials";
        }
    }
    
    if (!isDefined(self.WeaponCategory))
        return false;
    
    self.AttachmentList = ReturnAttachmentArray(self.WeaponCategory);
    for (h = 0; h < self.AttachmentList.size; h++)
    {
        if (self.AttachmentList[h] == AttachmentRef)
        {    
            return true;
        }
    }
    return false;
}

giveInfraredVision(status)
{
    if (self.money >= level.itemPrice[status]["General"]["Infrared"])
    {
        if (!isDefined(self.infraredOn))
        {
            self.infraredOn = true;
            self iPrintln("^2Infrared Vision ^7Purchased Successfully");
            self.money -= level.itemPrice[status]["General"]["Infrared"];
            self setinfraredvision(1);
            self useservervisionset(1);
            self setvisionsetforplayer(level.remore_mortar_infrared_vision, 1);
        }
        else
            self SendError("AlreadyHasInfrared");
    }
    else
        self SendError("MoreMoney");
}

giveInfraredVisionRaw()
{
    self setinfraredvision(1);
    self useservervisionset(1);
    self setvisionsetforplayer(level.remore_mortar_infrared_vision, 1);
}

RefillAmmo()
{
    self.currentWeapon = self GetCurrentWeapon();
    if (self.money >= level.itemPrice["Human"]["Weapons"]["Ammo"])
    {
        if (isValidWeapon(self.currentWeapon))
        {
            self setWeaponAmmoClip(self.currentWeapon, weaponClipSize(self.currentWeapon));
            self giveMaxAmmo(self.currentWeapon);
            self.money -= level.itemPrice["Human"]["Weapons"]["Ammo"];
            self iPrintln("^2Max Ammo ^7Purchased Successfully");
        }
        else
            self SendError("InvalidWeapon");
    }
    else
        self SendError("MoreMoney");
}

AddHealth(amount, status)
{
    if (self.money >= level.itemPrice[status]["General"]["Health"])
    {
        self.addingHealth = true;
        wait 0.01;
        self.health += amount;
        self.maxhealth = self.health;
        self.addingHealth = false;
        if (!self.healthMonitor)
            self thread MonitorHealth();
        self.money -= level.itemPrice[status]["General"]["Health"];
        self iPrintln("^1+50 Health ^7Purchased Successfully");
    }
    else
        self SendError("MoreMoney");
}

MonitorHealth()
{
    self endon("disconnect");
    self endon("infected");
    self endon("normalHealth");
    level endon("game_ended");
    
    self.healthMonitor = true;
    for (;;)
    {
        if (!self.addingHealth)
        {
            if (self.health > 100)
                self.maxhealth = self.health;
        }
        if (self.health < 100)
        {
            self.maxhealth = 100;
            self.healthMonitor = false;
            self notify("normalHealth");
        }
        wait 0.01;
    }
}

GiveUAV(status)
{
    if (self.money >= level.itemPrice[status]["General"]["UAV"])
    {
        if (!isDefined(self.UAV))
        {
            self.UAV = true;
            self SetClientUIVisibilityFlag("g_compassShowEnemies", 1);
            self.money -= level.itemPrice[status]["General"]["UAV"];
            self iPrintln("^2UAV ^7Purchased Successfully");
        }
        else
            SendError("AlreadyHasUAV");
    }
    else
        self SendError("MoreMoney");
}

replaceWeaponWorld(weapon, category)
{
    self.currentWeapon = self GetCurrentWeapon();
    if (isValidWeapon(self.currentWeapon))
    {
        self.currentWeaponNew = self.validReturn;
        if (weapon != self.primaryWeapon && weapon != self.secondaryWeapon)
        {
            if (self.currentWeapon == self.primaryWeapon)
                self.primaryWeapon = weapon;
            if (self.currentWeapon == self.secondaryWeapon)
                self.secondaryWeapon = weapon;
            
            if (self.currentWeapon == "knife_held_mp")
                self TakeWeapon("knife_held_mp");
            else
                self TakeWeapon(self.currentWeapon);
            self GiveWeapon(weapon);
            self setWeaponAmmoClip(weapon, weaponClipSize(weapon));
            self GiveStartAmmo(weapon);
            self SwitchToWeapon(weapon);
        }
        else
            self SendError("AlreadyHasWeapon");
    }
    else
        self SendError("InvalidWeapon");
}

replaceWeapon(weapon, category)
{
    self.currentWeapon = self GetCurrentWeapon();
    if (self.money >= level.itemPrice["Human"]["Weapons"][category])
    {
        if (isValidWeapon(self.currentWeapon))
        {
            self.currentWeaponNew = self.validReturn;
            if (weapon != self.primaryWeapon && weapon != self.secondaryWeapon)
            {
                if (self.currentWeapon == self.primaryWeapon)
                    self.primaryWeapon = weapon;
                if (self.currentWeapon == self.secondaryWeapon)
                    self.secondaryWeapon = weapon;
                
                if (self.currentWeapon == "knife_held_mp")
                    self TakeWeapon("knife_held_mp");
                else
                    self TakeWeapon(self.currentWeapon);
                self GiveWeapon(weapon);
                self setWeaponAmmoClip(weapon, weaponClipSize(weapon));
                self GiveStartAmmo(weapon);
                self SwitchToWeapon(weapon);
                self.money -= level.itemPrice["Human"]["Weapons"][category];
            }
            else
                self SendError("AlreadyHasWeapon");
        }
        else
            self SendError("InvalidWeapon");
    }
    else
        self SendError("MoreMoney");
}

replaceWeaponAttachment(weapon, attachment)
{
    self.currentWeapon = self GetCurrentWeapon();
    if (self.money >= level.itemPrice["Human"]["Attachments"][attachment])
    {
        if (isValidWeapon(self.currentWeapon) && self isValidAttachment(weapon, attachment) && self.currentWeapon != "knife_held_mp")
        {
            if (self.currentWeapon != weapon + "+" + attachment)
            {
                if (attachment == "dw" && StrTok(self.currentWeapon, "_")[1] == "dw")
                    self SendError("AlreadyHasAttachment");
                else
                {
                    self.currentWeaponNew = self.validReturn;
                    oldAmmo = self GetWeaponAmmoStock(self.currentWeapon);
                    self TakeWeapon(self.currentWeapon);
                    self.newWeaponString = weapon + "+" + attachment;
                    if (attachment == "dw")
                        self GiveWeapon(StrTok(self.currentWeaponNew, "_")[0] + "_dw_mp");
                    else
                        self GiveWeapon(self.newWeaponString);
                    self SetWeaponAmmoStock(self.newWeaponString, oldAmmo);
                    self SwitchToWeapon(self.newWeaponString);
                    self.money -= level.itemPrice["Human"]["Attachments"][attachment];
                }
            }
            else
                self SendError("AlreadyHasAttachment");
        }
        else
            self SendError("InvalidWeaponAttachment");
    }
    else
        self SendError("MoreMoney");
}

replaceCurrentWeaponAttachment(attachment)
{
    self.currentWeapon = self GetCurrentWeapon();
    if (StrTok(self.currentWeapon, "_")[1] != "dw")
        self.currentWeapon = StrTok(self.currentWeapon, "+")[0];
    else
        self.currentWeapon = StrTok(self.currentWeapon, "_")[0] + "_mp";
    self.validReturn = self.currentWeapon;
    
    self thread replaceWeaponAttachment(self.currentWeapon, attachment);
}

storeHuds()
{
    self.MoneyHUD destroyElem();
    self.MoneyHUD destroy();
    self.MoneyHUD = self drawText("Money: ", "objective", 2, 0, 130, (1, 1, 1), 0, (0, 1, 0), 0.50, 1, false);
    self.MoneyHUD.alignX = "left";
    self.MoneyHUD.horzAlign = "left";
    self.MoneyHUD.vertAlign = "center";
    self.MoneyHUD FadeOverTime(0.50);
    self.MoneyHUD.alpha = 1;
    
    self.HealthHUD destroyElem();
    self.HealthHUD destroy();
    self.HealthHUD = self drawText("Health: ", "objective", 2, 0, 155, (1, 1, 1), 0, (1, 0, 0), 0.50, 2, false);
    self.HealthHUD.alignX = "left";
    self.HealthHUD.horzAlign = "left";
    self.HealthHUD.vertAlign = "center";
    self.HealthHUD FadeOverTime(0.50);
    self.HealthHUD.alpha = 1;
    
    self.HealthValue = drawValue(self.health, "objective", 2, 57, 155, (1, 1, 1), 0, (1, 0, 0), 0.50, 2, false);
    self.HealthValue.alignX = "left";
    self.HealthValue.horzAlign = "left";
    self.HealthValue.vertAlign = "center";
    self.HealthValue FadeOverTime(0.50);
    self.HealthValue.alpha = 1;
    
    self.MoneyValue = drawValue(self.money, "objective", 2, 57, 130, (1, 1, 1), 0, (0, 1, 0), 0.50, 2, false);
    self.MoneyValue.alignX = "left";
    self.MoneyValue.horzAlign = "left";
    self.MoneyValue.vertAlign = "center";
    self.MoneyValue FadeOverTime(0.50);
    self.MoneyValue.alpha = 1;
}

destroyHuds()
{
    foreach(player in level.players)
    {
        player.MoneyHUD destroyElem();
        player.MoneyHUD destroy();
    
        player.HealthHUD destroyElem();
        player.HealthHUD destroy();
        
        player.HealthValue destroyElem();
        player.HealthValue destroy();
        
        player.MoneyValue destroyElem();
        player.MoneyValue destroy();
        wait 0.05;
    }
    level.infoBarText destroyElem();
    level.infoBarText destroy();
}

destroyPlayerHuds()
{
    self.MoneyHUD destroyElem();
    self.MoneyHUD destroy();

    self.HealthHUD destroyElem();
    self.HealthHUD destroy();
    
    self.HealthValue destroyElem();
    self.HealthValue destroy();
    
    self.MoneyValue destroyElem();
    self.MoneyValue destroy();
}

returnRandomPlayer()
{
    return randomint(level.players.size);
}

selectRandomPlayers()
{
    level.startingZombieCount = 1;
        
    for (i = 0; i < level.startingZombieCount; i++)
    {
        level.zombieSelectionInProgress = true;
        level.selectedPlayer[i] = level thread returnRandomPlayer();
        level.currentSelectedPlayer = level.selectedPlayer[i];
        if (level.players[level.currentSelectedPlayer].name != "PlaceHolderName" && level.players[level.currentSelectedPlayer] isHost() && level.hostCantBecomeZombie)
        { }
        else
        {
            level.players[level.currentSelectedPlayer] suicide();        
            level.players[level.currentSelectedPlayer].startingZombie = true;
            level.zombiecount += 1;
        }
        wait 0.05;
    }
    wait 1;
    level.zombieSelectionInProgress = false;
    return level.selectedPlayers;
}

traceBullet(traceDistance, traceReturn, detectPlayers)
{
    if (!isDefined(traceDistance))
        traceDistance = 10000000;
    if (!isDefined(traceReturn))
        traceReturn = "position";
    if (!isDefined(detectPlayers))
        detectPlayers = false;

    return bulletTrace(self getEye(), self getEye() + VectorScale(AnglesToForward(self getPlayerAngles()), traceDistance), detectPlayers, self)[traceReturn];
}

slowHumans(time)
{
    if (self.money >= level.itemPrice["Zombie"]["General"]["SlowHumans"])
    {
        if (!isDefined(level.slowHumans))
        {
            self endon("disconnect");
            self endon("endSlowHumans");
            
            self.money -= level.itemPrice["Zombie"]["General"]["SlowHumans"];
            level.slowHumans = true;
            level.slowHumansTime = time;
            iPrintln("^1All Humans Have Been Slowed For " + time + " Seconds");
            for (;;)
            {
                if (level.slowHumansTime != 0)
                {
                    level thread setAllPlayerSpeed(0.7);
                    wait 1;
                    level.slowHumansTime -= 1;
                }
                else
                {
                    level thread setAllPlayerSpeed(1);
                    level.slowHumans = undefined;
                    iPrintln("^2Humans Speed Returned To Normal");
                    self notify("endSlowHumans");
                }
                wait 0.01;
            }
        }
        else
            self SendError("AlreadySlowedHumans");
    }
    else
        self SendError("MoreMoney");
}

setAllPlayerSpeed(speed)
{
    foreach (player in level.players)
    {
        if (player.status != "zombie")
            player setMoveSpeedScale(speed);
        wait 0.01;
    }
}

infiniteAmmo()
{
    if (self.money >= level.itemPrice["Human"]["Weapons"]["UnlimitedAmmo"])
    {
        if (!isDefined(self.infiniteAmmo))
        {
            self endon("disconnect");
            self endon("infected");
            
            self.infiniteAmmo = true;
            self.money -= level.itemPrice["Human"]["Weapons"]["UnlimitedAmmo"];
            for (;;)
            {
                wait 0.1;
                weapon = self GetCurrentWeapon();
                self GiveMaxAmmo(weapon);
            }
        }
        else
            self SendError("AlreadyHasInfiniteAmmo");
    }
    else    
        self SendError("MoreMoney");
}

watchForTurretDeath()
{
    self endon("turretRemoved");
    level endon("game_ended");
    
    for (;;)
    {
        self waittill("destroy_turret");
        self setturretminimapvisible(0);
        playFxOnTag(level.auto_turret_settings[self.turrettype].damagefx, self, level.auto_turret_settings[self.turrettype].stunfxtag);
        wait 1;
        level thread GiveDestroyedTurretMoney("zombie", 30);
        self delete();
        level.turretsSpawned -= 1;
        self notify("turretRemoved");
        wait 0.01;
    }
}

GiveDestroyedTurretMoney(status, money)
{
    foreach (player in level.players)
    {
        if (player.status == status)
        {
            player.money += money;
            player iPrintln("A Human Turret Was ^1Destroyed^7, All Zombies Have Been Given ^2$30 Bonus Cash");
        }
        wait 0.01;
    }
}

spawnTurretPlayer(turrettype)
{
    if (self.money >= level.itemPrice["Human"]["General"]["Turret"])
    {
        if (level.turretsSpawned < level.turretLimit)
        {
            self iPrintln("^2Turret ^7Purchased and Spawned Successfully");
            self.money -= level.itemPrice["Human"]["General"]["Turret"];
            tempSpawnPosition = self.origin + VectorScale(AnglesToForward((0, self getPlayerAngles()[1], self getPlayerAngles()[2])), 100);
            tempSpawnPosition[2] += 20;
            spawnPosition = bulletTrace(tempSpawnPosition, ((tempSpawnPosition) - (0, 0, 130)), false, self)["position"];
            turret = spawnTurret("auto_turret", spawnPosition, turrettype);
            level.turretsSpawned += 1;
            turret.angles = (0, self getPlayerAngles()[1], self getPlayerAngles()[2]);
            turret setModel("t6_wpn_turret_sentry_gun");
            turret setTurretTeam("allies");
            turret.status = "human";
            turret.team = "allies";
            SetupTurretHealth(turret);
            turret thread watchdamage();
            turret.weaponinfoname = turrettype;
            turret.turrettype = "sentry";
            turret setturrettype(turret.turrettype);
            turret laserOn();
            turret setturretminimapvisible(1);
            turret thread watchForTurretDeath();
            turret thread turretPlayerWatcher();
            turret maps/mp/_entityheadicons::setentityheadicon(self.pers["team"], self, level.turrets_headicon_offset["default"]);
            return turret;
        }
        else
            self SendError("MaxTurrets");
    }
    else
        self SendError("MoreMoney");
}

playerAnglesToForward(player, distance)
{
    return player.origin + VectorScale(AnglesToForward(player getPlayerAngles(), distance));
}

ToggleUFO()
{
    self endon("disconnect");
    self endon("death");
    self endon("disableUFO");

    self.UFO = booleanOpposite(self.UFO);
    self iPrintln(booleanReturnVal(self.UFO, "UFO Mode: ^1Off", "UFO Mode: ^2On^7\nPress [{+frag}] To Move!"));

    if (self.UFO)
    {
        self.parentObject = spawn("script_origin", self.origin);
        self.parentObject.angles = self.angles;
        self PlayerLinkTo(self.parentObject, undefined);
        self disableWeapons();

        for(;;)
        {
            if(self fragButtonPressed())
                self.parentObject moveTo(playerAnglesToForward(self, 25), 0.05);
            wait 0.01;
        }
    }
    else
    {
        self unlink();
        self enableWeapons();
        self.parentObject delete();
        self notify("disableUFO");
    }
}

forceHost()
{
    if (self isHost())
    {
        self.forceHost = booleanOpposite(self.forceHost);
        self iPrintln(booleanReturnVal(self.forceHost, "Force Host: ^1Off", "Force Host: ^2On"));
    
        if (self.forceHost)
        {
            setDvar("party_connectToOthers", "0");
            setDvar("partyMigrate_disabled", "1");
            setDvar("party_mergingEnabled", "0");
            setDvar("allowAllNAT", "1");
        }
        else
        {
            setDvar("party_connectToOthers", "1");
            setDvar("partyMigrate_disabled", "0");
            setDvar("party_mergingEnabled", "1");
            setDvar("allowAllNAT", "0");
        }
    }
}

resetDvars()
{
    self.infraredOn = undefined;
    self.infiniteAmmo = undefined;
    self.UAV = undefined;
    self SetClientUIVisibilityFlag("g_compassShowEnemies", 0);
}

setupTeamDvars()
{
    if (level.spawnBots)
        self thread spawnBots();
    level.teamLimit = 18;
    level.teamBalance = 0;
    level.disableweapondrop = 1;
    level.allow_teamchange = 0;
    setDvar("scr_disable_weapondrop", 1);
    setDvar("scr_teambalance", 0);
    setDvar("party_autoteams", 0);
    setDvar("ui_allow_teamchange", "0");
    setDvar("g_TeamName_Allies", "Humans");
    setDvar("g_TeamName_Axis", "Zombies");
    setDvar("g_customTeamName_Allies", "Humans");
    setDvar("g_customTeamName_Axis", "Zombies");
}

RandomWeapon()
{
    level endon("game_ended");
    level endon("winnerDeclared");
    while(1)
    {
        id = random(level.tbl_weaponids);
        weaponname = id["reference"];
        attachmentlist = id["attachment"];
        attachments = strtok( attachmentlist, " " );
        attachments[attachments.size] = "";
        attachment = random(attachments);
        
        if (id[ "group" ] != "weapon_launcher" && id[ "group" ] != "weapon_sniper" && id[ "group" ] != "weapon_lmg" && id[ "group" ] != "weapon_assault" && id[ "group" ] != "weapon_smg" && id[ "group" ] != "weapon_pistol" && id[ "group" ] != "weapon_cqb" && weaponname != "weapon_null") //&& id[ "group" ] != "weapon_special")
            correctweapon = false;
        else
            correctweapon = true;
        if (weaponname == "m32")
            return weaponname + "wager_mp+" + attachment;
        if (weaponname == "minigun")
            return weaponname + "wager_mp+" + attachment;            
        if (correctweapon)
            return weaponname + "_mp+" + attachment;
        wait 0.05;
    }
}

giveEquipment(equipment, status)
{
    if (self.money >= level.itemPrice[status]["Equipment"][equipment])
    {
        self TakeWeapon(self.previousEquipment);
        self.previousEquipment = equipment;
        self GiveWeapon(equipment);
        self SetWeaponAmmoClip(equipment, 1);
        self iPrintln("Equipment Purchased Successfully: ^2" + equipment);
        self.money -= level.itemPrice[status]["Equipment"][equipment];
    }
    else
        self SendError("MoreMoney");
}

givePerk(perk, status)
{
    if (self.money >= level.itemPrice[status]["Perks"][perk])
    {
        if (!self HasPerk(perk))
        {
            self SetPerk(perk);
            self iPrintln("Perk Purchased Successfully: ^2" + perk);
            self.money -= level.itemPrice[status]["Perks"][perk];
        }
        else
            self SendError("HasPerk");
    }
    else
        self SendError("MoreMoney");
}
mapedits.gsc
Code:
setupCustomMap()
{
    if(getDvar("mapname") == "mp_nuketown_2020")
        level thread Nuketown();
    if(getDvar("mapname") == "mp_hijacked")
        level thread Hijacked();
    if(getDvar("mapname") == "mp_express")
        level thread Express();
    if(getDvar("mapname") == "mp_meltdown")
        level thread Meltdown();
    if(getDvar("mapname") == "mp_drone")
        level thread Drone();
    if(getDvar("mapname") == "mp_carrier")
        level thread Carrier();
    if(getDvar("mapname") == "mp_overflow")
        level thread Overflow();
    if(getDvar("mapname") == "mp_slums")
        level thread Slums();
    if(getDvar("mapname") == "mp_turbine")
        level thread Turbine();
    if(getDvar("mapname") == "mp_raid")
        level thread Raid();
    if(getDvar("mapname") == "mp_la")
        level thread Aftermath();    
    if(getDvar("mapname") == "mp_dockside") 
        level thread Cargo();    
    if(getDvar("mapname") == "mp_village")
        level thread Standoff();
    if(getDvar("mapname") == "mp_nightclub")
        level thread Plaza();    
    if(getDvar("mapname") == "mp_socotra")
        level thread Yemen();
    if(getDvar("mapname") == "mp_dig")
        level thread Dig();    
    if(getDvar("mapname") == "mp_pod")
        level thread Pod();    
    if(getDvar("mapname") == "mp_takeoff")
        level thread Takeoff();    
    if(getDvar("mapname") == "mp_frostbite")
        level thread Frost();    
    if(getDvar("mapname") == "mp_mirage")
        level thread Mirage();    
    if(getDvar("mapname") == "mp_hydro")
        level thread Hydro();    
    if(getDvar("mapname") == "mp_skate")
        level thread Grind();    
    if(getDvar("mapname") == "mp_downhill")
        level thread Downhill();    
    if(getDvar("mapname") == "mp_concert")
        level thread Encore();    
    if(getDvar("mapname") == "mp_vertigo")
        level thread Vertigo();    
    if (getDvar("mapname") == "mp_magma")
        level thread Magma();
    if(getDvar("mapname") == "mp_studio")
        level thread Studio();    
    if(getDvar("mapname") == "mp_paintball")
        level thread Rush();    
    if(getDvar("mapname") == "mp_castaway")
        level thread Cove();    
    if(getDvar("mapname") == "mp_bridge")
        level thread Detour();
    if(getDvar("mapname") == "mp_uplink")
        level thread Uplink();
}

Nuketown()
{

//Created by SneakerStreet

level thread removeSkyBarrier();

ents = getEntArray();

for ( index = 0; index < ents.size; index++ )

{

if(isSubStr(ents[index].classname, "trigger_hurt"))

ents[index].origin = (0, 0, 9999999);

}

CreateWall((-1764.85, 2000.12, -62.375), (-1764.85, 1257.29, 54.2165), false);

CreateWall((1616.64, 1224.47, -62.375), (1579.93, 2106.39, 31.2165), false);

CreateWall((-1730.21, 2012.1, -62.375), (1212.58, 2178.81, 31.2165), false);

CreateWall((-332.763, 1607.79, -62.375), (-539.104, 1878.52, 31.2165), false);

CreateWall((377.98, 1722.92, -62.375), (-511.404, 1879.66, 31.2165), false);

CreateWall((1195.64, 2178.51, -62.375), (1582, 2090.19, 31.2165), false);

CreateWall((349.356, 1693.02, -62.375), (304.849, 1572.35, 31.2165), false);

CreateFlag((17.9331, 68.6009, -67.545), (-875.736, 397.349, -184.875), false, false);

CreateFlag((-943.075, 674.018, -184.875), (-515.929, 1085.88, -62.375), false, false);

CreateMysteryBox((1571.41, 1478.37, -62.375), (0, 180, 0), 180);

CreateWall((404.843, 1728.89, -62.375), (452.982, 1870.49, 31.2165), false);

CreateWall((491.337, 1985.94, -62.375), (542.425, 2152.52, 31.2165), false);

CreateDoor((440.61, 1727.37, -62.375), (494.772, 1893.17, -62.375), 2, (90, 0, 20), 3, 2, 30, 80);

CreateFlag((1543.28, 1233.26, -62.375), (765.379, 339.959, -56.875), false, false);

CreateDoor((752.023, 346.572, 79.125), (785.033, 234.903, 79.125), 2, (90, 0, 160), 1, 2, 25, 80);

CreateWall((605.158, -5.16187, 31.77), (507.489, -26.531, 32.7705), false);

CreateMysteryBox((721.65, 65.8110, 79.125), (0, 195, 0), 200);

CreateTurret((1220.55, 1426.23, -62.375), (0, 180, 0), "auto_gun_turret_mp");

}


Hijacked()
{     //Created by SneakerStreet
    
    level thread removeSkyBarrier();
    
    CreateRamp((-3220.81, -38.2039, -203.875), (-3634.31, -38.2039, -105.148));
    
    CreateRamp((-3220.81, -96.4962, -203.875), (-3634.31, -96.4962, -105.148));
    
    CreateGrid((-3634.31, 158.754, -105.14), (-4012.08, -363.347, -105.150));
    
    CreateRamp((-4035.31, -166.407, -89.827), (-4284.69, -166.407, -100.111));
    
    CreateFlag((-4280.07, -166.407, -84.0316), (1862.83, 2.16665, 12.125), false, false);
    
    CreateWall((-3617.28, 161.414, -91.0974), (-3617.28, -23.7058, -89.3446));
    
    CreateWall((-3617.28, -371.928, -91.0974), (-3617.28, -105.433, -89.3447));
    
    CreateWall((-3617.28, 161.414, -19.0594), (-3617.28, -23.7058, -19.0595));
    
    CreateWall((-3617.28, -371.928, -19.0594), (-3617.28, -105.433, -19.0595));
    
    CreateWall((-3651.92, -400.863, -91.0974), (-4065.98, -400.863, -89.3447));
    
    CreateWall((-3651.92, 187.493, -91.0974), (-4065.98, 187.493, -89.3447));
    
    CreateWall((-3651.92, -400.863, -19.0594), (-4065.98, -400.863, -19.0595));
    
    CreateWall((-3651.92, 187.493, -19.0594), (-4065.98, 187.493, -19.0595));
    
    CreateDoor((-3651.92, -263.403, -89.273), (-3623.35, -67.2757, -89.273), 2, (90, 0, 0), 3, 2, 40, 80);
    
    CreateMysteryBox((-3991.34, -298.889, -89.273), (0, 180, 0), 180);
    
    CreateDoor((934.141, -64.6471, 156.125), (934.23, -139.539, 156.125), 2, (90, 0, 0), 1, 2, 30, 80);
    
    CreateWall((1112.75, 349.878, 148.3), (1112.75, 210.334, 215.467));
    
    CreateFlag((1213.35, 91.0521, 191.125), (-88.6514, 401.425, 54.375), false, false);
}

Express()
{

    //Created by SneakerStreet
    
    level thread removeSkyBarrier();
    
    ents = getEntArray();
    
    for ( index = 0; index < ents.size; index++ )
    
    {
    
    if(isSubStr(ents[index].classname, "trigger_hurt"))
    
    ents[index].origin = (0, 0, 9999999);

    }
    
    CreateWall((184.838, -4317.3, -251), (605.213, -3467.05, -252.001));
    
    CreateWall((-123.843, -3057.74, -251), (499.299, -3054.76, -252.001), true);
    
    CreateWall((-96.913, -3072.53, -251), (-143.44, -3419.21, -252.001));
    
    CreateWall((-160.467, -3396.23, -285.875), (332.919, -3560.31, -170.875));
    
    CreateDoor((65.6684, -3507.61, -285.875), (404.822, -3613.27, -285.875), 2, (90, 0, 113), 6, 2, 45, 80);
    
    CreateFlag((362.08, 3.41673, -15.875), (5.48254, -3278.66, -285.875), false, false);
    
    CreateFlag((-312.56, -4122.03, -278.481), (1625.93, 717.686, -119.875), false, false);
    
    CreateMysteryBox((-88.7142, -4215.29, -283.879), (0, 75, 0), 200);
    
    CreateWall((593.515, -3516.82, -251), (480.038, -3389.83, -252.001), true);
    
    CreateWall((498.922, -3405.56, -251), (495.475, -3230.67, -252.001), true);
    
    CreateWall((513.64, -3170.28, -251), (495.029, -3047.12, -252.001), true);
    
    CreateWall((7216.29, 5765.38, -246.096), (7216.29, 3816.55, -246.100));
    
    CreateWall((7225.28, 5787.5, -246.096), (7720.17, 5787.5, -246.100));
    
    CreateWall((7688.34, 5780.5, -246.096), (7688.34, 3816.55, -246.100));
    
    CreateWall((7216.29, 3840.55, -245.096), (7713.34, 3840.55, -246.100));
    
    CreateFlag((1699.91, -259.677, -119.875), (7416.26, 3993.93, -276.875), false, false);
    
    CreateWall((7670.69, 4715.32, -275.999), (7500.7, 4715.32, -170.999));
    
    CreateWall((7250.9, 4715.32, -275.999), (7400.57, 4715.32, -170.999));
    
    CreateDoor((7454.07, 4897.37, -276.875), (7454.07, 4741.04, -276.875), 2, (90, 0, 90), 3, 2, 45, 80);
    
    CreateFlag((7638.55, 5729.58, -276.875), (-436.363, -668.072, 32.125), false, false);
    
    CreateTurret((7579.1, 5426.69, -276.875), (0, 270, 0), "auto_gun_turret_mp");
    
    CreateWall((7574.69, 4106.14, -276.875), (7358.72, 4106.14, -176.875));
    
}

Meltdown()
{

//Created by SneakerStreet

level thread removeSkyBarrier();

CreateDoor((392.164, 3068.36, 72.125), (278.457, 3069.84, 72.125), 2, (90, 0, 90), 3, 2, 25, 80);

CreateWall((226.785, 2832.98, 76.1835), (230.15, 2933.15, 130.585), false);

CreateWall((771.727, 3057.22, 104.761), (767.697, 2938.02, 162.201), false);

CreateTurret((632.572, 2807.5, 72.125), (0, 270, 0), "auto_gun_turret_mp");

CreateFlag((618.556, 3109.18, 72.125), (-449.039, 602.905, -63.875), false, false);

CreateWall((-82.2494, 2341.3, 1.81599), (-89.3638, 2241.62, -1.62544), false);

CreateDoor((384.153, 1554.55, 56.125), (410.666, 1702.4, 56.125), 2, (90, 0, 0), 3, 2, 30, 80);

CreateMysteryBox((258.351, 1696.18, 52.625), (0, 180, 0), 180);

CreateWall((-85.7236, 1076.88, -19.5703), (-120.888, 1170.36, -14.7731), false);

CreateWall((-558.181, 2110.78, 50.1599), (-671.859, 2243.76, 126.61), false);

CreateWall((-567.743, 1271.59, 55.816), (-647.513, 1145.21, 126.61), false);

CreateFlag((-246.347, 1693.47, 52.625), (1428.69, -1261.09, -135.875), false, false);

CreateFlag((1034.87, -595.899, -135.875), (548.833, 3233.1, -63.875), false, false);

CreateMysteryBox((752.359, 2925.92, 72.125), (0, 180, 0), 180);

CreateWall((359.738, 237.55, 71.9095), (359.23, 362.369, 166.005), false);

CreateMysteryBox((434.641, 441.279, 72.125), (0, 180, 0), 180);

CreateFlag((723.398, 527.79, 72.125), (777.788, 4085.92, -139.875), false, false);

}


Drone()
{ //Created by SneakerStreet

level thread removeSkyBarrier();

CreateWall((1215.54, 4866.73, 350.000), (1215.54, 3830.98, 410.001));

CreateWall((747.495, 4893.91, 350.000), (747.495, 3879.62, 400.001));

CreateFlag((-1989.92, -1544.91, 80.125), (975.217, 4002.58, 383.527), false, false);

CreateWall((1233.01, 5239.11, 306.672), (685.086, 5239.11, 410.001));

CreateMysteryBox((782.136, 4750.91, 322.756), (0, 180, 0), 180);

CreateWall((732.252, 4384.83, 306.966), (949.721, 4384.83, 440.001));

CreateWall((1225.43, 4384.83, 306.966), (1030.13, 4384.83, 440.001));

CreateDoor((835.37, 4419.47, 323.125), (994.89, 4405.74, 307.082), 2, (90, 0, 90), 3, 2, 40, 80);

CreateFlag((800.991, 5174.4, 322.672), (39.8576, 247.259, 191.973), false, false);

CreateWall((-2083.06, -3907.82, 120.721), (-1950.86, -2783.41, 120.722));

CreateWall((-2333.93, -2752.03, 120.721), (-2468.08, -3900.31, 120.722));

CreateWall((-1941.79, -2815.43, 76.9313), (-2356.63, -2748.44, 150.722));

CreateWall((-2443.89, -3871.25, 120.721), (-2069.5, -3922.25, 120.722));

CreateFlag((314.296, 2362.35, 149.309), (-2139.53, -2893.09, 80.125), false, false);

CreateWall((-2281.44, -3093.27, 79.125), (-2069.16, -3122.76, 200.000));

CreateWall((-2400.87, -3416.29, 79.125), (-2147.74, -3441.69, 190.000));

CreateDoor((-2300.31, -3461.12, 79.125), (-2103.24, -3453.11, 79.125), 2, (90, 0, 95), 3, 2, 40, 80);

CreateFlag((-2402.45, -3826.9, 80.4844), (-1181.91, 458.191, 130.125), false, false);

CreateWall((1202.56, 3875.73, 405.021), (1204.83, 4020.26, 405.022), true);

CreateMysteryBox((-2403.09, -3641.65, 79.125), (0, 174, 0), 180);
}

Carrier()
{ //Created by SneakerStreet

level thread removeSkyBarrier();

CreateWall((-6338.76, 71.5299, -178.747), (-6064.15, 71.5299, 5.2425));

CreateDoor((-6190.34, 36.889, -179.875), (-6040.5, 36.889, -179.875), 2, (90, 90, 0), 2, 2, 40, 80);

CreateFlag((-6471.57, 807.364, -75.875), (-6065.65, 432.036, -179.875), false, false);

CreateFlag((-6018.97, -565.886, -179.875), (-4804.72, 88.8425, 179.707), false, false);

CreateMysteryBox((-6244.13, -587.359, -179.875), (0, 90, 0), 200);

CreateWall((-3072, 1169.42, -71.711), (-2023.43, 1169.42, 50.856));

CreateWall((-2561.82, 780.718, -71.711), (-2561.82, 1050.23, 50.856));

CreateWall((-2515.72, 846.076, 33.9096), (-2390.86, 840.551, 150.242));

CreateFlag((-3608.48, 259.09, 44.125), (-2982.27, 988.6, -67.875), false, false);

CreateDoor((-2527.18, 905.965, -67.875), (-2527.18, 1085.32, -67.875), 2, (90, 0, 0), 3, 2, 40, 80);

CreateFlag((-2133.37, 954.633, -67.875), (-5587.75, -1319.09, 32.5916), false, false);

CreateMysteryBox((-2401.62, 854.641, -67.875), (0, 90, 0), 200);

CreateWall((-2873.91, 1062.78, -67.875), (-2873.91, 912.849, 50.856));

CreateDoor((-6034.35, -932.641, 44.125), (-6114.75, -935.505, 44.125), 2, (90, 90, 0), 1, 2, 30, 80); 
}

Overflow()
{//Created by SneakerStreet

level thread removeSkyBarrier();

CreateDoor((-641.857, 2574.3, 46.3647), (-796.355, 2723, 9.73313), 2, (90, 45, 0), 3, 2, 45, 80);

CreateWall((-36.2708, 3116.26, -37.3189), (-49.0945, 2214.1, 166.325));

CreateWall((-1457.13, 2047.69, 56.384), (-1562.27, 2151.66, -40.2381));

CreateWall((-1088.23, 2569.99, -8.17117), (-1540.92, 2139.91, 90.978));

CreateMysteryBox((-374.718, 2307.87, 68.5788), (0, 45, 0), 190);

CreateMysteryBox((-500.649, 2433.09, 64.3465), (0, 45, 0), 190);

CreateFlag((-99.5322, 2618.29, 53.6948), (-212.94, 204.43, 131.867), false, false);

CreateWall((-1012.59, 2370.09, -5.87588), (-1081.65, 2435.24, 90.978));

CreateDoor((-535.641, -1954.21, -30.875), (-535.641, -2137.1, -30.875), 2, (90, 0, 0), 4, 2, 45, 80);

CreateTurret((-906.905, -2128.75, -39.875), (0, 0, 0), "auto_gun_turret_mp");

CreateFlag((-1048.48, -2204.45, -39.875), (1860.42, -716.028, 5.76341), false, false);

CreateFlag((1293.89, -677.814, 0.125), (-1912.51, 376.417, 4.83456), false, true);

CreateZipline((341.629, -1626.65, -20.238), (336.687, -1879.46, -22.9997), 2, false);

CreateZipline((-1126.88, 1863.12, -7.875), (-1336.62, 2143.05, -6.17976), 2, false);

CreateZipline((-945.661, 2039.56, -7.875), (-1198.11, 2281.02, -5.87588), 2, false);

CreateMysteryBox((-721.739, -1927.64, -39.875), (0, 90, 0), 190);
}

Slums()
{

//Created by SneakerStreet

level thread removeSkyBarrier();

CreateFlag((-194.452, 2214.43, 584.125), (646.46, 2209.4, 584.125), false, false);

CreateWall((1103.56, 1316.45, 617.007), (1109.99, 1286.66, 700.882), true);

CreateWall((2523.61, 2296.97, 582.059), (1635.36, 2301.24, 680.125), false);

CreateWall((1231.54, 1758.07, 590.638), (1431.25, 1755.29, 651.898), false);

CreateWall((2175.38, 1937.58, 589.507), (2302.86, 2054.05, 651.898), false);

CreateTurret((1777.86, 1879.67, 630.125), (0, 180, 0), "auto_gun_turret_mp");

CreateWall((1177.86, 2178.13, 584.125), (1177.86, 2054.72, 700.882), false);

CreateWall((1177.86, 1803.43, 580.145), (1181.38, 1952.2, 700.882), false);

CreateDoor((1213.71, 1854.19, 584.125), (1203.34, 2010.82, 576.125), 2, (90, 0, 0), 3, 2, 45, 80);

CreateFlag((2470.37, 2255.71, 581.706), (2264.69, 2082.68, 728.125), false, false);

CreateFlag((2523.16, 2319.84, 728.125), (1685.14, 2186.82, 584.125), false, false);

CreateFlag((1705.7, 2253.03, 584.125), (1461.43, 1830.47, 732.125), false, false);

CreateFlag((1763.96, 1838.59, 732.125), (1685.14, 2186.82, 584.125), false, false);

CreateElevator((2195.53, 2263.91, 576.125), (2195.53, 2263.91, 693.263), 3, 1);

CreateElevator((2230.54, 2263.74, 576.125), (2230.54, 2263.74, 693.263), 3, 1);

CreateMysteryBox((1878.14, 2265.43, 584.125), (0, 90, 0), 170);

CreateFlag((2424.33, 2449.15, 576.125), (25.383, 872.695, 585.316), false, false);

CreateTurret((1737.77, 2092.72, 576.125), (0, 180, 0), "auto_gun_turret_mp");

}

Turbine()
{
//Created by SneakerStreet

level thread removeSkyBarrier();

CreateWall((827.169, 1531.73, 11.1541), (612.864, 1628.24, 160.335));

CreateDoor((921.515, 2194.4, -52.6308), (848.799, 2336.42, -79.1544), 2, (90, 80, 0), 2, 2, 30, 80);

CreateFlag((759.482, 1626.8, -9.81147), (857.227, 2203.62, 171.535), false, false);

CreateWall((1835.21, 2925.73, 162.125), (1903.96, 3010.17, 280.094));

CreateWall((1890.57, 1813.25, 162.125), (2004.49, 1813.58, 270.453));

CreateMysteryBox((1850.95, 2351.13, 162.125), (0, 50, 0), 180);

CreateDoor((2186.42, 2657.71, 135.326), (2263.87, 2586.83, 92.125), 2, (90, 45, 0), 2, 2, 35, 80);

CreateFlag((1928.1, 2213.4, 162.125), (73.3258, -957.542, 167.766), false, false);

CreateWall((-800.685, 2470.97, 392.125), (-1116.19, 2509.25, 507.345));

CreateWall((-978.946, 2019, 421.878), (-709.41, 1965.26, 521.878));

CreateDoor((-990.374, 2129.75, 409.786), (-1108.36, 2038.37, 412.321), 2, (90, 90, 0), 2, 2, 35, 80);

CreateFlag((-763.272, 2241.8, 430.523), (381.242, 4514.97, -226.459), false, false);

CreateElevator((862.284, 3343.22, -149.327), (862.284, 3343.22, 226.47), 3, 1);

}

Raid()
{

//Created by SneakerStreet

CreateDoor((3146.58, 4311.64, 148.125), (3265.47, 4313.52, 148.125), 2, (90, 90, 0), 2, 2, 30, 80);

CreateWall((3332.11, 4314.93, 139.133), (3332.64, 4315.51, 209.811), true);

CreateWall((2712.32, 4099.01, 147.116), (4713.05, 3969.66, 138.459), true);

CreateWall((2725.54, 4063.47, 148.125), (2726.47, 4007.47, 145.517), true);

CreateFlag((2774.64, 4426.36, 176.125), (2242.68, 1606.19, 193.125), false, false);

CreateFlag((1111.64, 3360.64, 116.125), (1412.36, 2146.36, 168.125), false, false);

CreateMysteryBox((2992.36, 4215.65, 184.125), (90, 180, 0), 150);

CreateDoor((979.641, 2968.06, 116.125), (965.216, 2819.41, 116.125), 2, (90, 90, 90), 3, 2, 30, 80);

CreateMysteryBox((1445.36, 3466.27, 116.125), (90, 180, 0), 150);

CreateDoor((1824.36, 3172.59, 108.125), (1711.6, 3172.4, 116.125), 2, (90, 90, 90), 3, 2, 30, 80);

CreateRamp((1283.64, 3612.14, 146.125), (1332.36, 3613.79, 146.125), false);

CreateRamp((1362.25, 3612.93, 168.568), (1268.57, 3612.99, 164.995), false);

}

Aftermath()
{

//Created by SneakerStreet

level thread removeSkyBarrier();

CreateWall((259.739, 1717.19, -234.221), (104.445, 1717.19, -110.879));

CreateWall((-149.641, 3042.64, -206.742), (-370.206, 3042.56, -90.906));

CreateWall((60.3897, 2750.68, -237.822), (60.3897, 2891.98, -110.865));

CreateDoor((-600.859, 2134.37, -213.356), (-625.429, 2308.04, -208.508), 2, (90, 0, 0), 3, 2, 30, 80);

CreateMysteryBox((59.6409, 2161.34, -278.875), (0, 0, 0), 180);

CreateFlag((653.665, 2668.3, -278.875), (-2597.97, -728.659, -206.875), false, false);

CreateWall((-663.641, 4788.36, -198.875), (-813.557, 4788.36, -48.2582));

CreateWall((-775.005, 4094.77, -163.309), (-671.267, 4094.77, -61.9342));

CreateDoor((-298.779, 4366.23, -198.875), (-297.96, 4174.98, -198.875), 2, (90, 120, 0), 3, 2, 30, 80);

CreateMysteryBox((-170.76, 4580.77, -198.875), (0, 0, 0), 180);

CreateFlag((-759.498, 4730.61, -198.875), (-2493.48, 1330.77, -194.39), false, false);

CreateFlag((-2532.78, 160.487, -292.875), (71.92, 4700.43, -198.875), false, true);

CreateWall((-1567.52, 4284.64, -64.875), (-1405.23, 4350.08, 64.875));

CreateWall((-1804.99, 4293.64, -64.875), (-1942.89, 4292.99, 25.3305));

CreateDoor((-1663.15, 4898.36, -64.875), (-1543.65, 4897.55, -64.875), 2, (90, 90, 0), 2, 2, 30, 80);

CreateMysteryBox((-1843.06, 4770.36, -64.875), (0, 90, 0), 200);

CreateFlag((-1841.46, 4398.31, -64.875), (-1448.31, 1887.69, -9.78521), false, false);
}

Cargo()
{

//Created by SneakerStreet

level thread removeSkyBarrier();

CreateWall((-562.469, 5716.58, 260.976), (-562.469, 4311.41, 260.977));

CreateWall((-572.272, 5728.14, 260.976), (-1688.77, 5728.14, 260.977));

CreateWall((-1646.46, 5728.14, 260.976), (-1646.46, 5519.57, 260.977));

CreateWall((-1646.46, 5560.57, 260.976), (-887.089, 5560.57, 260.977));

CreateWall((-930.089, 5545.54, 260.976), (-930.089, 4311.41, 260.977));

CreateWall((-923.681, 4334.04, 260.976), (-532.491, 4334.04, 260.977));

CreateMysteryBox((-895.446, 4550.35, 228.125), (0, 0, 0), 200);

CreateTurret((-702.522, 4762.63, 228.125), (0, 90, 0), "auto_gun_turret_mp");

CreateWall((-929.77, 4386.49, 286.851), (-929.77, 4769.59, 286.852), true);

CreateWall((-970.294, 5561.89, 228.125), (-665.011, 5565.11, 328.125));

CreateDoor((-790.27, 5529.15, 228.125), (-630.49, 5533.64, 228.125), 2, (90, 90, 0), 2, 2, 35, 80);

CreateFlag((39.4639, 3732.33, -75.875), (-1475.33, 5658.5, 228.125), false, false);

CreateFlag((-610.787, 4389.97, 228.125), (380.633, -59.876, 48.3491), false, false);

CreateWall((889.474, 986.000, 77.8754), (714.635, 986.000, 176.785));

CreateWall((642.322, 1410.75, 60.1042), (642.322, 1558.86, 160.000));

CreateDoor((935.862, 1396.71, 62.125), (990.923, 1511.54, 62.125), 2, (90, 0, 0), 2, 2, 30, 80);

CreateMysteryBox((920.359, 1346.81, 62.125), (0, 0, 0), 200);

CreateFlag((721.3, 1033.84, 62.125), (-1255.15, 2549.34, 27.125), false, false);

}

Standoff()
{

//Created by SneakerStreet

level thread removeSkyBarrier();

CreateWall((1708.39, 479.641, 88.125), (1708.39, -118.921, 200.00));

CreateWall((2120.93, 479.641, 88.125), (2120.93, -118.921, 200.00));

CreateWall((2131.54, 479.641, 70.463), (1827.83, 479.641, 200.00));

CreateDoor((1948.23, 445, 61.9984), (1780.24, 452.663, 63.5949), 2, (90, 90, 0), 3, 2, 40, 80);

CreateWall((2073.39, -40.0607, 28.6381), (2073.39, -40.0608, 28.6382), true);

CreateMysteryBox((2086.29, 336.552, 39.405), (0, 0, 0), 200);

CreateFlag((1741.85, -51.1617, 10.8402), (-1432.48, -756.379, 100.125), false, false);

CreateWall((2120.08, 506.375, 110.783), (2120.08, 1030.33, 110.784), true);

CreateWall((2120.74, 982.81, 110.783), (1347.91, 982.81, 110.784), true);

CreateFlag((270.921, 662.592, 0.208849), (1456.77, 635.14, 88.125), false, false);

CreateFlag((-678.289, -143.879, 0.125), (2015.4, 876.25, 88.125), false, false);

CreateDoor((-295.377, 1456.36, 144.125), (-176.935, 1457.39, 144.125), 2, (90, 90, 0), 2, 2, 40, 80);

CreateWall((254.844, 1012.06, 144.125), (254.845, 1012.07, 264.405));

CreateFlag((191.961, 940.829, 142.525), (2.65467, -1653, -23.875), false, false);

CreateMysteryBox((24.9719, 1057.36, 142.174), (0, 90, 0), 200);

CreateElevator((-175.581, 515.641, 7.58157), (-175.581, 515.641, 227.351), 3, 1);

}

Plaza()
{

//Created by SneakerStreet

level thread removeSkyBarrier();

CreateWall((-16347.8, 1455.32, -83.5871), (-16211.1, 1309.94, 40.0661));

CreateWall((-16956.7, 845.661, -83.5871), (-16835.9, 719.3, 40.0661));

CreateDoor((-16831.8, 1333.63, -87.875), (-16941.9, 1435.3, -87.875), 2, (90, 130, 0), 3, 2, 40, 80);

CreateFlag((-16817, 757.063, -79.875), (-16024.2, 3598.98, -119.875), false, false);

CreateMysteryBox((-16471.8, 967.277, -79.875), (0, 132, 0), 200);

CreateWall((-15717.8, 2075.86, -143.929), (-15716.2, 1933, -35.1064));

CreateDoor((-15878.8, 2077.48, -139.875), (-15873.2, 2204.44, -139.375), 2, (90, 90, 0), 3, 2, 40, 80);

CreateFlag((-16217.6, 1416.58, -87.875), (-16024.2, 3598.98, -119.875), false, false);

CreateMysteryBox((-16363.4, 1553.17, -85.875), (0, 42, 0), 200);

CreateDoor((-17605.5, 364.307, -139.875), (-17703.2, 370.599, -139.375), 2, (90, 0, 0), 3, 2, 40, 80);

CreateFlag((-16924.1, 709.523, -87.875), (-18994.8, 1770.75, -152.875), false, false);

CreateWall((-17565.2, 210.16, -139.875), (-17440.3, 208.443, -20.1064));

CreateMysteryBox((-17105.3, 907.332, -85.875), (0, 42, 0), 200);

CreateFlag((-17550.2, 104.653, -139.875), (-15602.3, 2058.21, -138.875), false, true);

CreateTurret((-16696.4, 1191.07, -87.875), (0, 130, 0), "auto_gun_turret_mp"); 

}

Yemen()
{

    //Created by SneakerStreet

level thread removeSkyBarrier();

CreateWall((720.215, 2649.11, 1220.67), (957.541, 2649.11, 1220.70));

CreateWall((941.1, 2628.11, 1220.67), (941.1, 2388.67, 1220.70));

CreateWall((955.1, 2400.67, 1220.67), (1341.55, 2400.67, 1220.70));

CreateWall((1323.55, 2412.67, 1220.67), (1323.55, 3033.9, 1220.70));

CreateWall((1323.55, 2990.9, 1220.67), (679.313, 2990.9, 1220.70));

CreateWall((700.313, 2979.9, 1220.67), (700.313, 2615.77, 1220.70));

CreateWall((957.541, 2649.11, 1165.13), (1089.64, 2649.11, 1246.70));

CreateWall((1210.98, 2649.11, 1165.13), (1338.86, 2649.11, 1246.70));

CreateDoor((1116.23, 2726.03, 1165.13), (1116.23, 2660.09, 1165.13), 2, (90, 90, 0), 2, 2, 35, 80);

CreateWall((941.1, 2628.11, 1177.38), (941.1, 2529.05, 1230.40));

CreateFlag((816.704, 451.115, 35.829), (1134.71, 1053.09, 571.125), false, false);

CreateZipline((1048.19, 1263.16, 571.243), (1243.58, 2480.77, 1165.13), 2, true);

CreateZipline((886.84, 1336.36, 571.243), (994.163, 2494.75, 1165.13), 2, true);

CreateFlag((754.601, 2944.23, 1165.13), (-1051.87, -663.635, 195.732), false, false);

CreateMysteryBox((734.954, 2694.55, 1165.13), (0, 0, 0), 200);

CreateDoor((9.70401, -1428.66, 264.125), (10.4697, -1344.32, 264.125), 2, (90, 0, 0), 1, 2, 30, 80);

CreateFlag((382.419, -1674.6, 265.482), (171.308, 901.268, 112.085), false, false);

CreateWall((-341.832, -1901.52, 204.125), (-516.078, -1901.52, 350.000));

CreateWall((-697.012, -1901.52, 204.125), (-602.042, -1901.52, 350.000));

CreateDoor((-436.423, -1936.16, 208.908), (-554.982, -1926.24, 204.125), 2, (90, 90, 0), 2, 2, 35, 80);

CreateWall((-227.797, -2348.29, 161.881), (-227.797, -2148.74, 161.883));

CreateFlag((-471.269, -2442.1, 208.125), (500.542, 2382.57, 279.125), false, false);

CreateWall((-25.9032, -2115.93, 241.26), (-25.9032, -2329.16, 241.30), true);

}

Dig()
{ 

//Created by xTiibo Modz V1.3 

level thread removeSkyBarrier(); 

CreateDoor((-431, -2150, 92.13), (-690, -2160, 83.13), 2, (90, 90, 0), 6, 2, 25, 80);

CreateFlag((-438, -1490, 72), (-391, -2405, 93.343), false, false);

CreateDoor((1385, -654, 170.13), (1385, -654, 245.13), 2, (90, 90, 0), 3, 2, 20, 80);

CreateFlag((-905, -1827, 82), (1010, -1428, 146), false, false);

CreateElevator((1285, -1295.391, 149.125), (1285, -1295.391, 236.792), 2, 1);

CreateWall((-284, -2453, 97.037), (-284, -2316.826, 160.632), true); //1 door

CreateWall((1258, -655.474, 224.037), (1257, -655.474, 314.632), false); //2 door

CreateWall((1939, -1249.474, 272.037), (1940, -1249.474, 352.037), true); //antiglitch 1

CreateWall((1295, -820, 252.037), (1295, -810, 321.037), true); //antiglitch 2

CreateWall((2285, -1246, 262.037), (2284, -1246, 342.037), true); //antiglitch 3

CreateWall((1347, -1247, 281.037), (1348, -1247, 352.037), true); //antiglitch 4

CreateWall((1645, -1248, 265.037), (1644, -1248, 342.037), true); //antiglitch 5

CreateWall((1295, -456, 265.037), (1295, -457, 342.037), true); //antiglitch 6

CreateWall((1292, 330, 232.037), (1560, 330, 231.037), false);

CreateWall((1292, 330, 282.037), (1560, 330, 281.037), false);

CreateDoor((1761, -201, 228.13), (1476, -201, 240.13), 2, (90, 0, 0), 5, 2, 20, 80);

CreateZipline((885.188, -1152, 120.125), (1282, -1120, 250.125), 1, true);

CreateRamp((2063, -230, 211), (2063, -382, 280), false);

CreateMysteryBox((1899, -920, 288.961), (0, 90, 0), 100);

CreateFlag((1886, 28, 227), (1883, 251, 255.343), false, true);

CreateMysteryBox((1238, -557, 220.961), (0, 90, 0), 100);

CreateWall((1230, 336, 247.037), (1231, 336, 297.037), true); //antiglitch 7

CreateWall((1481, -37, 288.037), (1481, -36, 398.037), true); //antiglitch 8

CreateWall((2021.44, 811, 326.037), (1459, 811, 325.037), true);

CreateWall((1463, 802, 326.037), (1465, 435, 325.037), true);

CreateRamp((1503, 370, 210), (1507, 456, 275), true);

CreateFlag((1353, 923, 251), (-2540, 1029, 110.343), false, false);

CreateWall((-2356, 717, 96.037), (-1979, 714, 180.037), true);

CreateDoor((-574, 1314, 97.13), (-734, 1486, 96), 2, (90, 0, 0), 3, 2, 25, 80);

CreateDoor((-257, 1331, 97.13), (-128, 1177, 96), 2, (90, 90, 0), 2, 2, 25, 80);

CreateFlag((-137, 1504, 9), (147, 1316, 245.343), true, true); //hidden flag

CreateFlag((2000, 716, 213), (1993, 764, 295.343), true, false);

CreateWall((-2567, 1034, 119.037), (-2567, 1033, 179.037), true);

CreateMysteryBox((-309, 1504, 97.961), (0, 90, 0), 100);

CreateTurret( (3, 1361, 223.125), (0, 180, 0), "auto_gun_turret_mp" );

CreateDoor((1589, -741, 288.13), (1524, -1143, 235.13), 2, (90, 0, 0), 5, 2, 15, 80);

CreateWall((1408, 558, 296.037), (1407, 564, 350.037), true); //antiglitch 9

CreateWall((1484, 126, 306.037), (1485, 126, 370.037), true); //antiglitch 10

CreateFlag((-1634, 789, 115), (-1568, 848, 88.125), false, false);

CreateWall((-1799, 995, 65.037), (-1799, 996, 95.037), false);

CreateWall((1474, -1051, 282), (1474, -933, 283), true); //antiglitch 11

}

Pod()
{ //Created by SneakerStreet

level thread removeSkyBarrier();

CreateRamp((-1853.95, -283.205, 431.354), (-1853.73, -541.851, 552.879));

CreateGrid((-1881.09, -559.391, 552.879), (-1652.56, -1171.57, 552.879));

CreateWall((-1782.44, -530.608, 552.879), (-1596.61, -530.608, 553.879));

CreateWall((-1782.44, -530.608, 620.456), (-1596.61, -530.608, 621.456));

CreateWall((-1622.73, -547.608, 552.879), (-1622.73, -890.091, 553.879));

CreateWall((-1622.73, -547.608, 620.456), (-1622.73, -890.091, 621.456));

CreateWall((-1622.73, -890.091, 552.879), (-1622.73, -1240.01, 652.331));

CreateFlag((-1896.85, -1205.03, 568.754), (1231.24, -123.347, 271.204), false, false);

CreateMysteryBox((-1657.37, -1043.78, 568.754), (0, 0, 0), 200);

CreateDoor((-1731.34, -565.249, 568.754), (-1861.37, -565.962, 568.77), 2, (90, 90, 0), 2, 2, 35, 80);

CreateFlag((-223.609, 1182.8, 437.228), (-1117.22, -1569.99, 420.125), false, true);

CreateWall((-759.361, 399.641, 416.365), (-670.56, 399.641, 540.365));

CreateDoor((-704.069, 146.653, 420.125), (-674.916, 53.1565, 426.941), 2, (90, 115, 0), 3, 2, 20, 80);

CreateFlag((-592.616, 284.226, 420.125), (694.142, -2266.54, 384.854), false, false);

CreateWall((643.359, -1693.64, 372.152), (490.641, -1698.15, 471.152));

CreateWall((1315.65, -510.299, 243.532), (1515.54, -510.299, 340.532));

CreateWall((1084.35, -470.453, 264.626), (935.74, -470.453, 360.626));

CreateDoor((1008.18, -505.094, 260.841), (889.929, -490.453, 270.227), 2, (90, 90, 0), 2, 2, 30, 80);

CreateMysteryBox((1146.03, -664.641, 246.097), (0, 90, 0), 200);

CreateFlag((584.203, -1609.16, 348.125), (-1863.72, 2090.26, 480.152), false, false);

CreateTurret((1099.96, -1187.69, 260.125), (0, 90, 0), "auto_gun_turret_mp");

}

Takeoff()
{     //Created by speselized5

    level thread removeSkyBarrier();

    //CreateFlag((-377.345, 4304.17, 32.125), (-378.816, 4791.27, 115.426), false, true);

    CreateZipline((479.7, 3321.43, 32.125), (-667.716, 3452.09, 184.125), true);

    CreateDoor((-964.043, 3496.36, 201.465), (-963.085, 3432.2, 201.465), 3, (90, 180, 0), 4, 2, 30, 80);

    CreateWall((-1270.23, 3535.44, 250.027), (-1540.36, 3534.54, 250.20), false);

    CreateWall((-1528.46, 3542.86, 162.88), (-1526.32, 3752.09, 188.763), false);

    CreateWall((-1270.23, 3535.44, 180.027), (-1540.36, 3534.54, 180.20), false);

    CreateFlag((-1526.42, 3688.87, 188.763), (-382.147, 583.253, 64.125), false, false);

    //added by 0zersub

    CreateFlag((176.588, -586.988, -0.875), (-605.78, -373.684, -7.875), true, true);//Hidden place 1

    CreateFlag((-1769.58, 176.412, 0.125), (-1584.36, 455.641, 2.125), true, true);//Hidden place 2 

    CreateGrid((-735.641, 186.101, 32.125), (-768.359, 186.101, 32.125), (90, 90, 0), true);//Block window health center 05

    CreateGrid((-883.315, 189.158, -11.0192), (-905.15, 186.73, -11.0192), (90, 90, 0), true);//Block door health center 05 pt1

    CreateGrid((-883.315, 189.158, 29.9333), (-905.15, 186.73, 29.9333), (90, 90, 0), true);//Block door health center 05 pt2

    CreateDoor((-922.512, 12.78, 14.7714), (-983.655, -84.0735, 14.7714), 3, (90, 0, 0), 1, 2, 30, 80);//Behind door health center 05

    CreateDoor((-305.206, 4.0352, 14.7714), (-429.473, 3.96509, 14.7714), 3, (90, 0, 0), 3, 2, 30, 80);//Front door health center 05

    CreateGrid((614.037, 450.597, 188.125), (575.641, 450.597, 188.125), (90, 90, 0), true);//Block ramp lounge 04

    CreateGrid((1276.98, 772.571, 14.7928), (1276.98, 638.77, 14.7928), (0, 0, 0), false);//Block side door Lounge 04

    CreateGrid((1276.98, 772.571, 30.7928), (1276.98, 638.77, 30.7928), (0, 0, 0), false);//Block side door Lounge 04 pt1

    CreateDoor((1121.78, 518.149, 14.159), (1119.75, 353.967, 14.159), 3, (90, 90, 0), 4, 2, 30, 80);//Behind door Lounge 04

     CreateDoor((1256.41, 1281.34, 0.125), (1256.41, 1094.62, 43.8369), 3, (90, 90, 0), 4, 2, 30, 80);//Front door Lounge 04

    CreateMysteryBox((832.095, 415.641, 0.125), (0, 90, 0), 100);

    //Added by xTiibo Modz

    CreateFlag((-377.345, 4340.17, 32.125), (-378.816, 4460.27, 31.426), false, true);

    CreateRamp((-397, 4535, 20), (-397, 4665, 100), true);

    CreateRamp((-354, 4535, 20), (-354, 4665, 100), true);

    CreateWall((-150, 5365, 115.875), (-315, 5365, 225.125), false);

    CreateWall((-430, 5365, 115), (-640, 5365, 225.125), false);

    CreateGrid((-422, 4448, 11.875), (-322, 4523, 11.875), 90, false);

    CreateDoor((-343, 5365, 233.125), (-343, 5365.2, 130.125), 2, (90, 90, 0), 2, 2, 30, 80);

    CreateRamp((-140, 5460, 240), (-630, 5440, 225), false);

    CreateRamp((-140, 5380, 240), (-630, 5365, 225), false);//dessus barriere porte

    CreateWall((-132, 5375, 115.125), (-132, 5740, 247.125), false);

    CreateWall((-625, 5375, 115.125), (-625, 5740, 247.125), false);

    CreateRamp((-206, 5680, 115), (-206, 5487, 225), false);

    CreateFlag((-376, 5775.17, 120.125), (-620.909, 3410.52, 184.125), false, false);

    CreateWall((-503, 4953, 115.125), (-613, 4953, 210.125), false);

    CreateMysteryBox((-590, 5553, 125.125), (90, 180, 0), 100);

}

Frost()
{ 

//Frost v2 By speselized

CreateWall((2024.51, 1347.83, 15.56385), (1431.44, 1343.38, 15.134));

CreateWall((2024.51, 1347.83, 70.56385), (1431.44, 1343.38, 70.134)); 

CreateWall((1482.86, 1305.64, 15.9483), (1468.32, 1865.91, 15.78503)); 

CreateWall((1477.86, 1305.64, 70.9483), (1461.32, 1865.91, 70.78503)); 

CreateWall((1448.32, 1865.91, 15.78503), (614.996, 1849.04, 04.125)); 

CreateWall((1448.32, 1865.91, 70.78503), (614.996, 1849.04, 70.125)); 

CreateWall((641.555, 1837.11, 15.22837), (637.647, 2611.15, 1.50267)); 

CreateWall((641.555, 1837.11, 70.22837), (637.647, 2611.15, 70.50267)); 

CreateWall((675.847, 2577.92, 15.18936), (1196.11, 2591.8, 15.73985));

CreateWall((675.847, 2577.92, 70.18936), (1196.11, 2591.8, 70.73985));

CreateWall((1196.11, 2591.8, 15.73985), (1205.95, 2226.89, 15.3811)); 

CreateWall((1196.11, 2591.8, 70.73985), (1205.95, 2226.89, 70.3811)); 

CreateWall((1220.95, 2226.89, 15.3811), (1801.04, 2230.98, 4.249)); 

CreateWall((1220.95, 2226.89, 70.3811), (1801.04, 2230.98, 70.249));

CreateWall((1785.21, 2246.96, 15.48251), (1784.68, 2630.53, 15.16695)); 

CreateWall((1785.21, 2246.96, 70.48251), (1784.68, 2630.53, 70.16695)); 

CreateWall((1800.42, 2615.98, 15.13351), (2274.63, 2608.5, 0.495411)); 

CreateWall((1800.42, 2615.98, 70.13351), (2274.63, 2608.5, 70.495411)); 

CreateWall((2256.63, 2608.5, 15.495411), (2253.87, 1939.79, 15.93455)); 

CreateWall((2256.63, 2608.5, 70.495411), (2253.87, 1939.79, 70.93455)); 

CreateWall((1803.85, 1935.1, 15.92241), (2271.38, 1935.46, 15.068015)); 

CreateWall((1803.85, 1935.1, 70.92241), (2271.38, 1935.46, 70.068015)); 

CreateWall((1775.68, 1920.58, 15.20771), (1775.32, 1594.61, 15.4721)); 

CreateWall((1775.68, 1920.58, 70.20771), (1775.32, 1594.61, 70.4721)); 

CreateWall((1810.01, 1642.66, 15.373876), (2265.14, 1647.29, 15.54136)); 

CreateWall((1810.01, 1642.66, 70.373876), (2265.14, 1647.29, 70.54136)); 

CreateWall((2234.24, 1147.64, 15.85474), (2231.09, 1651.08, 15.2489)); 

CreateWall((2234.24, 1147.64, 70.85474), (2231.09, 1651.08, 70.2489)); 

CreateWall((2040.47, 1334.43, 15.13222), (2042.18, 1105.61, 15.8421)); 

CreateWall((2040.47, 1334.43, 70.13222), (2042.18, 1105.61, 70.8421)); 

CreateMysteryBox((2023.15, 2557.63, 17.8465), (0, 90, 0), 100);

CreateDoor((1632.37, 2051.31, 15.26624), (1634.01, 1868.05, 15.43343), 2, (90, 90, 0), 10, 2, 20, 80); 

CreateFlag((2132.49, 1042.16, -6.4455), (2132.55, 1167.39, -10.994), false, true);

CreateFlag((685.908, 2531.2, 0.125), (1864.82, -131.263, 14.5192), false, false); // Escape flag

}


Mirage()
{     //Created by speselized5 //fixed & added things by 0zersub

    level thread removeSkyBarrier();

    CreateWall((823.834, 1140.99, 122.83), (824.033, 1363.71, 124.094), false);

    CreateWall((823.834, 1140.99, 155.83), (824.033, 1363.71, 155.094), false);

    CreateWall((823.834, 1140.99, 190.83), (824.033, 1363.71, 190.094), false);

    CreateDoor((-3.43415, 1932.96, 35.125), (-4.36561, 1832.2, 35.125), 2, (90, 90, 0), 4, 2, 15, 80);//Main Door

    CreateWall((-847.348, 1385.49, 160.199), (-846.551, 1128.68, 160.2245), false);

    CreateWall((-847.348, 1385.49, 115.199), (-846.551, 1128.68, 115.2245), false);

    CreateWall((-741.408, 1157.64, 6.44371), (-591.747, 1155.67, -1.78725), true);

    CreateWall((-568.59, 1160.66, 18.3249), (-793.66, 1160.07, 18.8257), false);

    CreateWall((-568.59, 1154.66, 35.3249), (-793.4, 1160.07, 35.8257), false);

    CreateFlag((-472.499, 1819.5, 266.125), (-665.399, 1241.97, -11.631), false, true);//to upstairs balcony

    CreateWall((350.847, 1359.47, 271.28), (499.652, 1220.4, 271.396), false);

    CreateWall((-109.372, 975.154, 264.78), (165.357, 967.5, 255.809), false);

    CreateFlag((381.062, 1209.75, 266.125), (100.049, 833.463, 266.125), true, true);//Hidden flag upstairs

    CreateFlag((-2345.98, 1153.39, -39.875), (-661.969, 1667.64, -39.875), true, true);//Hidden flag to jail

    CreateMysteryBox((700.71, 1497.57, 101.961), (0, 90, 0), 100);

}

Hydro()
{ }

Grind()
{   //Created by 0zersub v1

    level thread removeSkyBarrier();

    CreateDoor((-1200.39, -703.971, 280.125), (-1200.39, -914.468, 280.125), 3, (90, 0, 0), 4, 2, 30, 80);//Front Door near green car

    CreateGrid((-360.919, -615.66, 305.48), (-362.822, -579.831, 305.228), (90, 0, 0), true);//Window block 1 main room

    CreateGrid((-360.919, -622.332, 331.094), (-362.822, -622.332, 331.228), (90, 0, 0), true);//Window block 2 main room 

    CreateFlag((723.166, -672.803, 184.125), (-408.296, -1101.71, 328.125), false, false);//Teleport to Secret Area

    CreateFlag((-1184.36, -1234.36, 330.125), (-2238.24, -590.123, 250.125), false, false);//Secret Area to Spawn Area

    CreateGrid((-523.207, -153.065, 167.273), (-524.207, -153.065, 167.273), (90, 0 , 0), true);//Block stairs door

    CreateDoor((747.641, 21.6409, 272.125), (747.641, 240.567, 272.125), 4, (90, 0, 0), 6, 2, 20, 80);//Skateboard track big Door upstairs

    CreateDoor((884.359, 225.584, 272.125), (884.359, 54.1851, 272.125), 3, (90, 0, 0), 2, 2, 20, 80);//skateboard track small Door upstairs

    CreateDoor((-431.359, -1236.36, 328.125), (-561.247, -1147.76, 328.125), 3, (90, 0, 0), 4, 2, 20, 80);//Secret Area Door

    CreateDoor((22.0251, -547.848, 184.125), (-138.707, -314.092, 280.125), 3, (90, 0, 0), 3, 2, 20, 80);//Behind Door main room

    CreateFlag((-773.923, -648.719, 280.125), (1934.7, -295.722, 207.625), false, false);//Emergency flag main room to outside 

    CreateMysteryBox((-431.141, -938.376, 280.125), (0, 180, 0), 50);

}

Downhill()
{    //created by 0zersub

    level thread removeSkyBarrier();

    CreateDoor((1592.14, -1358.97, 993.617), (1784.75, -1346.95, 993.617), 3, (90, 90, 0), 6, 2, 30, 80);//1st big door

    CreateDoor((1678.99, -1665.15, 993.617), (1678.99, -1237.56, 993.617), 5, (90, 0, 0), 7, 2, 30, 80);//2nd big door

    CreateDoor((2004.95, -865.984, 993.617), (2203.89, -949.491, 993.617), 4, (90, 90, 0), 3, 2, 30, 80);//front door control room 

    CreateDoor((2333.08, 844.748, 1010.54), (2164.86, 852.094, 1010.54), 4, (90, 90, 0), 4, 2, 30, 80);//behind door control room

    CreateDoor((1213.54, 2662.98, 1121.13), (1380.15, 2643.32, 1176.82), 4, (90, 68, 0), 2, 2, 30, 80);//house stairs door

    CreateFlag((138.591, -2711.65, 1043.5), (132.304, -2986.64, 1051.02), false, true);//lets go for ski

    CreateDoor((-161.336, -1163.73, 1011.29), (-117.646, -1053.61, 1011.29), 3, (90, 335, 0), 1, 2, 20, 80);//door mini room

    CreateDoor((-10.9226, -1488.14, 1019.73), (93.2197, -1548.69, 1019.73), 2, (90, 68, 0), 1, 2, 25, 80);//door near blue track

    CreateFlag((-151.149, 1028.47, 1115.13), (235.631, -1395.78, 1001.13), true, true);//hide area

    CreateFlag((1909.52, -1108.83, 980.125), (298.678, 752.412, 1064.13), false, false);//Emengercy flag big doors

    CreateFlag((1925.28, 771.042, 980.125), (298.678, 752.412, 1064.13), false, false);//Emengercy flag behind-middle door

    CreateDoor((2164.9, 536.592, 1010.54), (1990.36, 535.886, 1010.54), 3, (90, 90, 0), 4, 2, 30, 80);//middle door

    CreateMysteryBox((222.39, -1082.21, 1001.13), (0, 68, 0), 150);//mysterybox near turret

    CreateMysteryBox((2254.86, -1230.34, 980.125), (0, 0, 0), 150);//mysterybox near 2 big doors

    CreateTurret((440.635, -1155.56, 1001.13), (0, 90, 0), "auto_gun_turret_mp");

}


Encore()
{ //Created by SneakerStreet

level thread removeSkyBarrier();

CreateWall((-1980.08, 51.5708, -80.6471), (-1650.15, 51.5708, 71.678));

CreateDoor((-1476.64, -56.8855, -71.875), (-1458.42, -239.48, -71.875), 2, (90, 0, 0), 3, 2, 40, 80);

CreateFlag((-2267.94, -29.1935, -71.875), (-89.5406, 1347.84, 17.125), false, false);

CreateDoor((-724.359, 337.873, -55.875), (-724.359, 242.913, -55.875), 2, (90, 0, 0), 1, 2, 40, 80);

CreateWall((-130.423, 637.61, 56.125), (-213.599, 637.61, 180.345));

CreateMysteryBox((-308.359, 527.758, 16.125), (0, 0, 0), 200);

CreateFlag((-151.855, 597.137, 43.7445), (2099.51, 1831.5, 24.125), false, false);

CreateMysteryBox((-1925.14, -236.107, -71.875), (0, 0, 0), 200);

CreateWall((-15511.7, 22258.1, 330.000), (-15511.7, 20709.1, 330.001));

CreateWall((-16035.4, 22258.1, 330.000), (-16035.4, 20709.1, 330.001));

CreateWall((-15535.7, 20748.1, 330.000), (-16051.6, 20759.3, 288.954));

CreateWall((-15546.1, 22290.3, 311.61), (-15776.2, 22290.3, 501.534));

CreateWall((-16000.8, 22290.3, 310.266), (-15860.5, 22290.3, 501.534));

CreateWall((-16035.7, 22258.1, 310.266), (-16035.7, 22677.6, 501.534));

CreateWall((-15511.7, 22258.1, 310.266), (-15511.7, 22677.6, 501.534));

CreateWall((-15535.4, 22641.5, 310.266), (-16081.6, 22641.5, 501.534));

CreateDoor((-15642.1, 22324.9, 311.607), (-15817.1, 22324.9, 311.186), 2, (90, 90, 0), 3, 2, 60, 80);

CreateWall((-15748.3, 22290.3, 400.947), (-15898.1, 22290.3, 501.334));

CreateRamp((-15983.2, 22320.3, 310.713), (-15983.2, 22615.6, 361.002));

CreateRamp((-16001.1, 22595.4, 364.246), (-15539.9, 22595.4, 479.319));

CreateWall((-15529.3, 22539.3, 471.318), (-16047.4, 22539.3, 471.319));

CreateWall((-15529.3, 22503.8, 471.318), (-16047.4, 22503.8, 471.319));

CreateWall((-15529.3, 22467.8, 471.318), (-16047.4, 22467.8, 471.319));

CreateWall((-15529.3, 22431.8, 471.318), (-16047.4, 22431.8, 471.319));

CreateWall((-15529.3, 22395.8, 471.318), (-16047.4, 22395.8, 471.319));

CreateWall((-15529.3, 22359.8, 471.318), (-16047.4, 22359.8, 471.319));

CreateWall((-15529.3, 22323.8, 471.318), (-16047.4, 22323.8, 471.319));

CreateWall((-16064.2, 22236.4, 515.875), (-16064.2, 22685.4, 530.876), true);

CreateWall((-16105.7, 22669.1, 515.875), (-15486.8, 22669.1, 530.876), true);

CreateWall((-15485.8, 22676.7, 515.875), (-15485.8, 22228.5, 530.876), true);

CreateWall((-15511.7, 22244.2, 530.875), (-15511.7, 21847.1, 330.001), true);

CreateWall((-16035.4, 22245.1, 530.875), (-16035.4, 21847.1, 330.001), true);

CreateWall((-16035.4, 21167.7, 298.235), (-16035.4, 20743.1, 298.236), true);

CreateWall((-15511.7, 21167.7, 298.235), (-15511.7, 20743.1, 298.236), true);

CreateWall((-15590.4, 21011.7, 294.488), (-15871.5, 21011.7, 370.488));

CreateWall((-16000.8, 21648.6, 301.902), (-15704.9, 21648.6, 390.434));

CreateFlag((830.074, 2172.17, 24.125), (-15711.5, 20853.1, 291.682), false, false);

CreateMysteryBox((-15652, 22606.9, 314.865), (0, 90, 0), 200);

CreateTurret((-15927.1, 22326.9, 497.193), (0, 270, 0), "auto_gun_turret_mp");

CreateTurret((-15627.6, 22326.9, 497.193), (0, 270, 0), "auto_gun_turret_mp");

CreateFlag((-16029.6, 22634.5, 495.531), (977.526, -158.553, -22.7275), false, false);
}

Vertigo()
{     //Created by hi2108

    level thread removeSkyBarrier();

    CreateFlag((-1502.74, -0.586645, 8.625), (-1792.05, 0.265627, 104.125), false, false); //1.Flagge bei flugzeug

    CreateFlag((-2770.41, -1.43311, 104.125), (4204.24, 3698.54, -319.875), false, false); //2.flagge zur platform

    CreateFlag((4204.21, 2704.96, -317.145), (4194.28, 572.514, 228.125), false, false); //3.flagge zur kleinen fläche

    CreateFlag((4205.67, 183.574, 228.125), (4204.46, -1823.89, -316.997), false, false); //4.flagge zur 2.platform

    CreateFlag((4202.64, -2864.95, -317.512), (804.234, -460.628, -31.875), false, false); //aus platform in raum

    CreateFlag((225.466, 6.05344, 284.125), (3697.63, -2344.5, -319.875), false, true); //auf dach

    CreateFlag((-664.182, -0.729715, -18.3445), (-231.1, 0.696467, 152.125), false, false); //in raum in mitte

    CreateDoor((-242.787, -200.118, 182.264), (-342.909, -195.587, 182.125), 3, (90, 90, 0), 2, 2, 15, 80); // tür mitte links

    CreateDoor((-197.706, 201.627, 182.125), (-344.072, 194.001, 182.125), 3, (90, 90, 0), 2, 2, 15, 140); // tür mitte rechts

    CreateMysteryBox((-416.359, 323.22, 152.125), (0, 180, 0), 100); // rechts

    CreateMysteryBox((-416.359, -321.243, 152.125), (0, 180, 0), 100); //links

    CreateFlag((415.768, -171.803, 152.125), (322.98, -28.4677, -31.8557), false, false); // rechts flagge ausgang

    CreateFlag((426.865, 184.528, 152.125), (322.98, -28.4677, -31.8557), false, false); // linke flagge ausgang

    CreateDoor((4342.08, 378.503, 270.125), (4193.78, 372.046, 270.125), 3, (90, 90, 0), 9, 2, 15, 80); //3. kleine fläche

    CreateDoor((-958.072, -2143.1, -130.875), (-958.072, -2100, -130.875), 3, (90, 0, 0), 1, 2, 15, 80); // blocking door

    CreateDoor((-760, -2443.06, -130.875), (-700.83, -2443.06, -130.875), 3, (90, 90, 0), 1, 2, 15, 80); // kleiner raum

    CreateMysteryBox((4203.84, -2599.07, -319.875), (0, 90, 0), 100); // bei wand 3.kleine flache

    CreateMysteryBox((4077.55, 240.466, 228.125), (0, 180, 0), 100); // 2. platform

    CreateFlag((-815.507, -223.613, 8.125), (795.162, 241.987, 5.26984), false, false); //ausgang in 2.kleinen raum

    CreateFlag((-1003.14, 152.794, 8.125), (-1002.11, -152.863, 8.125), false, true); // switch between 2 rooms

    CreateFlag((-802.465, -0.856345, 144.125), (-1055.97, 146.293, 8.125), false, true); // nach oben 

    CreateFlag((45, 2690, -19.875), (-842.72, 198.753, 8.125), false, false); // relaxing place

    CreateGrid((3966.74, 2436.46, -439.42), (4580.25, 1928.6, -439.386), 90); // secret floor

    CreateRamp((4199.22, 2005, -350), (4199.22, 2137.64, -423.545)); // secret ramp

    CreateGrid((4283.85, -1518.63, -439.386), (4342.1, -1217.79, -439.386), 90); // secret floor other side 1.

    CreateGrid((4342.1, -1217.79, -439.386), (4027.28, -1087.45, -439.386), 90); // secret floor other side 2.

    CreateRamp((4261.31, -1126.72, -423.545), (3900.44, -1181.58, -329.42)); // secret ramp other side 1.

    CreateRamp((3900, -1181.58, -329.42), (3900, -1096.76, -308.852)); // secret ramp other side 2.

    CreateRamp((3900, -1096.76, -308.852), (4200, -1065, -99.499)); // secret ramp other side 3

    CreateGrid((4200, -1065, -99.499), (4270.84, -1404.71, -105.50), 90); // secret floor other side 4. lay down

}

Magma()
{ 

//Created By xTiibo Modz V1.2

level thread removeSkyBarrier();

CreateFlag((683, -927, -521), (-867.278, 308.809, -495.875), false, false);

Createwall((-2724.756, -1387.477, -559.9594), (-2724, -1215, -558.7044), false); //1

Createwall((-2724.756, -1387.477, -509.9594), (-2724, -1215, -508.7044), false ); //2

Createwall((-2724.756, -1387.477, -459.9594), (-2724, -1215, -458.7044), false ); //3

Createwall((-2724.756, -1387.477, -559.9594), (-3272, -1387, -558.7044), false); //1

Createwall((-2724.756, -1387.477, -509.9594), (-3272, -1387, -508.7044), false); //2

Createwall((-2724.756, -1387.477, -459.9594), (-3272, -1387, -458.7044), false); //3

CreateDoor((-2766, -1300, -559.54), (-2750.36, -1142.886, -515.54), 2, (90, 0, 0), 4, 2, 30, 80);

CreateRamp((-3275.756, -1202.477, -495.9594), (-3275, -1450, -450.7044), false );

CreateFlag((-2275, -1467, -559.875), (-2520, -1459, -559.875), false, true);

CreateElevator((-2250.048, 715, -489.6955), (-2250.048, 715, -355.6955), 2, 1);

CreateElevator((-2292, 96, -495.6955), (-2292, 96, -330), 2, 1);

CreateRamp((-3376.756, -1480.477, -450.9594), (-2970, -1480, -450.7044), false );

CreateRamp((-3376.756, -1550.477, -450.9594), (-2970, -1550, -450.7044), false );

CreateZipline((-1020, 539.994, -451.125), (-1709.11, 756.517, -343.876), 1, true);

CreateDoor((-2531, 47, -308.54), (-2290, 242.886, -495.54), 2, (90, 90, 0), 3, 2, 30, 80);

CreateFlag((-3092, -1630, -450), (-867.278, 308.809, -495.875), false, false);

Createwall((-3089, -1585.477, -460.9594), (-3089, -1662, -460.7044), false);

CreateDoor((-3400, -1470.886, -559.54), (-3217, -1470.886, -559.54), 2, (90, 0, 0), 3, 2, 30, 80);

CreateFlag((-191, 328, -495), (-1727, 744.532, -343.875), false, false);

CreateMysteryBox((-2509, -424.88, -300.125), (0, 90, 0), 110);

CreateMysteryBox((-3456, -1154, -490), (0, 0, 0), 110);

Createwall((-3217.756, -1626.477, -559), (-3217, -1520, -558.7044), false);

Createwall((-3217.756, -1626.477, -510), (-3217, -1520, -510.7044), false);

CreateFlag((-2292.64, -448, -316), (149.72, -1910, -303.875), false, false);

Createwall((111, -1758.477, -475), (111, -1688, -475.7044), false);

CreateFlag((-2307, -490, -495), (-2524, -175, -219.875), true, true);

Createwall((-2968, -1424, -459), (-2968, -1423, -459), false );



//CreateRamp((-3411, -1526, -465), (-3593, -1526, -400), false ); // Beta functions

//CreateFlag((-3545, -1526, -395), (-3570, -1492, -329), false, true); // Beta functions

}


Studio()
{ 
    //Created by SneakerStreet

    level thread removeSkyBarrier();

    CreateWall((2663.64, 1769.23, -35.875), (3437.73, 1779.6, 52.4055));

    CreateWall((2663.64, 1264.36, -35.875), (3306.99, 1264.64, 52.4055));

    CreateWall((3437.73, 1779.6, -35.875), (3445.38, 1037.52, 52.4055));

    CreateWall((3250.99, 1215.43, -35.875), (3250.99, 265.791, 52.4055));

    CreateWall((3245.88, 307.466, -35.875), (3464.73, 307.466, 52.4055));

    CreateFlag((2618.91, 1521.01, -43.875), (2828.98, 1681.26, -43.875), false, false);
    
    CreateWall((3260.71, 1032.48, -35.875), (3335.66, 1032.48, 52.4055));

    CreateDoor((3293.99, 970.546, -35.875), (3376.77, 1006.69, -35.875), 2, (90, 90, 0), 1, 2, 25, 80);

    CreateFlag((3402, 350.271, -35.875), (560.471, 1620.49, 21.125), false, false);

    CreateDoor((-35.2087, 1391.76, 96.8395), (-101.2, 1440.02, 30.125), 2, (90, 90, 0), 1, 2, 25, 80);

    CreateWall((-172.837, 1299.38, 104.133), (-212.079, 1154.06, 185.996));

    CreateMysteryBox((-141.644, 938.877, 96.125), (0, 75, 0), 150);

    CreateFlag((-78.4024, 1100.82, 134.125), (-254.783, 2457.95, 43.9841), false, false);

    CreateMysteryBox((3285.63, 655.848, -37.2403), (0, 0, 0), 150);

    CreateDoor((1113.25, 1539.84, 94.125), (1075.92, 1472.03, 94.125), 2, (90, 150, 0), 1, 2, 25, 80);

    CreateMysteryBox((987.696, 1328.37, 94.125), (0, 150, 0), 150);

    CreateWall((1326.96, 1422.36, 13.6993), (1275.2, 1336.82, 16.0596));

    CreateWall((1237.16, 1701.03, 31.0282), (1203.46, 1634.15, 30.2201));

    CreateWall((1245.85, 1719.8, 31.0282), (1105.97, 1795.88, 30.2201));

    CreateWall((1108.46, 1797.44, 30.3102), (1078.43, 1710.83, 30.6531));
}

Rush()
{        //Created by 0zersub

        level thread removeSkyBarrier();

        CreateDoor((-1174.86, 273.359, 19.2346), (-998.651, 260.509, 19.2346), 3, (90, 0, 90), 4, 2, 30, 80);//down door 1

        CreateDoor((527.634, 568.445, 163.135), (707.43, 551.102, 163.135), 3, (90, 0, 90), 3, 2, 30, 80);//up door 1

        CreateGrid((637.391, 624.359, 168.125), (637.381, 589.206, 168.125), (90, 0, 0), true);//up door 1 block 

        CreateGrid((-262.202, 187.641, 0.125), (-262.202, 218.359, 0.125), (90, 0, 0), true);//block door1

        CreateGrid((-262.202, 187.641, 19.2346), (-262.202, 218.359, 19.2346), (90, 0, 0), true);//block door2

        CreateGrid((-262.202, 187.641, 18.1175), (-262.202, 218.359, 18.1175), (90, 0, 0), true);//block door 3

        CreateGrid((-262.202, 187.641, 56.2747), (-262.202, 218.359, 56.2747), (90, 0, 0), true);//block door 4

        CreateDoor((401.641, 182.282, 163.135), (401.641, 272.492, 163.135), 3, (90, 0, 0), 2, 2, 10, 80);//up near turret door

        CreateDoor((821.385, -1203.39, 163.135), (639.706, -1192.77, 163.135), 3, (90, 0, 90), 4, 2, 30, 80);//up door 2 start

        CreateDoor((-650.641, -1478.15, 19.2346), (-650.641, -1636.72, 19.2346), 4, (90, 0, 0), 3, 2, 25, 80);//down door 2

        CreateFlag((422.376, -1081.86, 136.125), (724.956, -619.762, 264.125), false, false);//teleport to roof

        CreateFlag((730.114, 8.15531, 136.125), (987.052, 223.361, 136.125), false, false);//teleport from roof

        CreateFlag((-773.94, -688.024, 0.125), (658.285, -697.432, 170.125), false, true);//base1 to base2

        CreateFlag((-1460.52, -1446.08, 0.125), (-1610.49, -1448.21, 0.125), true, true);//secret gun room

        CreateTurret((573.692, 168.938, 136.125), (0, 270, 0), "auto_gun_turret_mp");//turret base 2

        CreateMysteryBox((944.359, -1028.16, 136.125), (0, 180, 0), 50);//mystery box base 2

        CreateMysteryBox((-446.606, 286.359, 0.125), (0, 90, 0), 50);//mystery box base 1

}

Cove()
{ 

        //Created By xTiibo Modz

        level thread removeSkyBarrier();

        ents = getEntArray();

        for ( index = 0; index < ents.size; index++ )

        {

        if(isSubStr(ents[index].classname, "trigger_hurt"))

        ents[index].origin = (0, 0, 9999999);

        }

        CreateDoor((1093, 196, 197.125), (990, 83, 233), 3, (90, -15, 0), 2, 2, 30, 80);

        Createwall((330, 157, 39), (266, 182, 120), true);

        CreateDoor((669, 219, 151.125), (555, 290, 96), 2, (90, 75, 0), 3, 2, 30, 80);

        Createwall((253, 442, 129), (120, 476, 189), true);

        CreateRamp((-2752, 993, -59.375), (-3080, 1037, 20),false);

        CreateMysteryBox((273, 389, 126), (90, 75, 0), 110);

        CreateFlag((310, 206, 47), (-1524, 1228.762, 59), false, false);

        CreateFlag((-3028, 1034, 23), (-3627, 865, 86), false, false);

        Createwall((-3647, 860, 82), (-3660, 1125, 83),false);

        Createwall((-3685, 860, 86), (-3700, 1125, 260),false);

        CreateRamp((-3633, 1123, 86), (-4850, 1123, 83),false);

        CreateRamp((-3920, 1067, 81), (-3920, 886, 80),false);

        CreateRamp((-3633, 1123, 86), (-3448, 1123, -30),false);

        CreateRamp((-3880, 920, 92), (-3712, 928, 130),false);

        CreateTurret((-3736, 925.938, 220), (0, -15, 0), "auto_gun_turret_mp");

        CreateDoor((-3847, 922, 116), (-3847, 1125, 100), 2, (90, 0, 0), 2, 2, 25, 80);

        Createwall((-3712, 1068, 105), (-3873, 1068, 176),false);

        Createwall((-3875, 1055, 105), (-3875, 955, 176),false);

        Createwall((-4820, 848, 30), (-4820, 1036, 205),false);

        Createwall((-4820, 1260, 30), (-4820, 1406, 205),false);

        CreateRamp((-5025, 1123, 30), (-4850, 1123, 83),false);

        CreateFlag((-4945, 1338, 45), (1529, 16, 279), false, false);

        Createwall((-4820, 1080, 30), (-4820, 980, 86),false);

        Createwall((-4820, 1155, 30), (-4820, 1255, 86),false);

        CreateDoor((-5036, 1123, 40), (-4850, 1120, 103), 2, (90, 0, 0), 6, 2, 25, 80);

        CreateRamp((-4880, 828, 30.375), (-4880, 1396, 30),false);

        CreateRamp((-4961, 828, 30.375), (-4961, 1396, 30),false);

        CreateRamp((-5040, 828, 30.375), (-5040, 1396, 30),false);

        CreateRamp((-5120, 828, 30.375), (-5120, 1396, 30),false);

        Createwall((-4844, 835, 55), (-5190, 835, 56),false);

        Createwall((-4844, 835, 115), (-5190, 835, 116),false);

        Createwall((-4844, 835, 171), (-5190, 835, 172),false);

        Createwall((-4844, 1366, 55), (-5190, 1365, 56),false);

        Createwall((-4844, 1366, 115), (-5190, 1365, 116),false);

        Createwall((-4844, 1366, 171), (-5190, 1365, 172),false);

        CreateMysteryBox((-4910, 910, 55), (90, 90, 0), 110);

        Createwall((-5169, 872, 44), (-5169, 1375, 152),true);

}


Detour()
{ 
//Created by Unknown Edited by SneakerStreet

    Createwall((1692,-65,152), (1692,-149,260),false);//front wall

    Createwall((1692,72,152), (1692,166,260),false);//front wall

    Createwall((820,163,150), (820,0,250),false);//spawm wall

    Createwall((1119,-152,158), (1119,-50,230),false);//spawm wall 2

    CreateRamp((1500.5,-110,327.375), (1500.5,105,322),false);//infront of bunker 2

    CreateRamp((1701,-111,275.875), (1520,-111,310),false);//infront of bunker 1

    CreateRamp((2050,110,152.125), (2050,-104.673,270),false);//ramp to grid

    CreateGrid((1980,-108,260), (1690,148,260), 90,false);//grid roof of bunker

    CreateFlag((781,15,8.125), (700,98,152.125),false,false);//entry 

    CreateFlag((2060,-109,152), (1863.73,552.918,19),false,false);//exit

    CreateDoor((1695,-86,152.125), (1695,2,152.125), 2, (90, 90, 90), 2, 2, 30, 80);//bunker

    CreateMysteryBox((1884,150,285), (180, 180, 0), 200);//on grid

    CreateWall((-624.083, -841.905, 14.7755), (-989.289, -841.905, 107.793), false);

    CreateWall((-2051.84, -871.515, -119.087), (-1808.13, -871.515, -20.3964), false);

    CreateDoor((-108.401, -886.641, -102.875), (102.62, -899.341, -127.875), 2, (90, 0, 90), 4, 2, 30, 80);

    CreateWall((568.79, -1103.18, -88.6716), (635.567, -1175.89, -41.892), false);

    CreateWall((1120.36, -594.121, -131.81), (820.37, -594.121, -56.9505), false);

    CreateWall((1469.38, -816.856, -126.144), (1469.38, -940.537, -44.528), false);

    CreateMysteryBox((-437.585, -1197.64, 1.125), (0, 90, 0), 200);

    CreateFlag((-1947.63, -938.975, -122.375), (2043.41, -132.094, -127.875), false, false);

    CreateFlag((1834.3, -130.745, -127.875), (1745.27, -127.745, -127.875), false, false);

    CreateFlag((1515.78, -130.745, -127.875), (1413.62, -130.745, -127.875), false, false);

    CreateFlag((1209.65, -130.745, -127.875), (776.064, 102.544, 152.125), false, false);
}

Uplink()
{ 

//Created by xTiibo Modz V1.1

level thread removeSkyBarrier();

CreateFlag((6662, -8110, 169.125), (2147, -743, 456.122),true,true); //Hidden flag

CreateFlag((2943.06, 2020.14, 288.125), (2943.12, 2128.27, 268.122),false,false);

CreateFlag((3312.29, 673.403, 320.125), (3305, 625.27, 320.125),false,true);

CreateRamp((2948.12, 2080.27, 251.122), (2948.12, 2613.3, 147.525),true);

CreateRamp((2948.12, 2613.7, 180.601), (2948.12, 2650, 170.525),false);

CreateMysteryBox((3473.69, 401, 320.125), (180, 180, 0), 100);

CreateZipline((3342.34, 331.79, 320.125), (2835.25, 371.082, 214.125), 2,true);

CreateRamp((3030, 3469.96, 160.446), (2962.12, 3337, 200.334),true);

CreateRamp((2962.12, 3337, 200.334), (2827.08, 3026.53, 200.426),false);

CreateFlag((6496, -8984, 168.139), (2479.04, 320.171, 214),false,false);

CreateFlag((2456.91, -884, 320.125), (6419.25, -6378.19, 173.635),false,false);

CreateWall((6113.6, -6312.37, 174.112), (6574.15, -6112.68, 260.381),false);

CreateWall((2950.15, 3475.88, 185.112), (2757.38, 3057, 280.112),true); //droite

CreateWall((3068.64, 3395, 185.739), (2880, 2990, 280.112),true); //gauche

CreateWall((2773.64, 3031, 179.739), (2857.64, 2984, 280.739),false);

CreateFlag((3145, 3709.7, 195), (2794.12, -605, 454.122),false,false);

CreateWall((2836, -655, 487.122), (2685, -655, 520.525),true);

CreateFlag((2455, 632, 214), (2794.12, -605, 454.122),false,false);

CreateMysteryBox((6658.48, -9002.75, 168.125), (180, 180, 0), 125);

CreateDoor((6290, -8039, 170), (6494.98, -8055, 170.433), 2, (90, 90, 0), 2, 2, 25, 80);

CreateWall((6188.83, -8061, 170.739), (6485.64, -8050, 280.739),false);

CreateWall((6580, -8060, 170.739), (6750, -8075, 280.739),false);

CreateDoor((3088, 3275, 179.433), (2969, 3345, 215), 3, (90, 65, 0), 2, 2, 25, 80);

CreateMysteryBox((2824.69, 3042, 216.125), (90, 0, 0), 125);

}
menu.gsc
Code:
changeVerification(player, verlevel)
{    
    player notify("statusChanged");
    player.status = verlevel;
    player giveMenu();
}

Iif(bool, rTrue, rFalse)
{
    if(bool)
        return rTrue;
    else
        return rFalse;
}

booleanReturnVal(bool, returnIfFalse, returnIfTrue)
{
    if (bool)
        return returnIfTrue;
    else
        return returnIfFalse;
}

booleanOpposite(bool)
{
    if(!isDefined(bool))
        return true;
    if (bool)
        return false;
    else
        return true;
}

verificationToNum(status)
{
    if (status == "human")
        return 2;
    if (status == "zombie")
        return 1;
    else
        return 0;
}

CreateMenu()
{
    if (self.status == "human")
    {
        self add_menu("Main Menu Human", undefined, "The Shop (Status: ^2Human^7)", "Unverified");
        self add_option("Main Menu Human", "General", ::submenu, "General", "General");
        self add_option("Main Menu Human", "Equipment", ::submenu, "Equipment", "Equipment");
        self add_option("Main Menu Human", "Perks", ::submenu, "Perks", "Perks");
        self add_option("Main Menu Human", "Weapons", ::submenu, "Weapons", "Weapons");
        self add_option("Main Menu Human", "Attachments", ::submenu, "Attachments", "Attachments");
        
        self add_menu("General", "Main Menu Human", "General" , "human");
        self add_option("General", "^7+50 Health / ^2$" + level.itemPrice["Human"]["General"]["Health"], ::AddHealth, 50, "Human");
        self add_option("General", "^7Max Ammo For Current Weapon / ^2$" + level.itemPrice["Human"]["Weapons"]["Ammo"], ::RefillAmmo);
        self add_option("General", "^7UAV / ^2$" + level.itemPrice["Human"]["General"]["UAV"], ::GiveUAV, "Human");
        self add_option("General", "^7Spawn Turret / ^2$" + level.itemPrice["Human"]["General"]["Turret"], ::spawnTurretPlayer, "auto_gun_turret_mp");
        self add_option("General", "^7Unlimited Ammo / ^2$" + level.itemPrice["Human"]["Weapons"]["UnlimitedAmmo"], ::infiniteAmmo);
        self add_option("General", "^7Infrared Vision / ^2$" + level.itemPrice["Human"]["General"]["Infrared"], ::giveInfraredVision, "Human");
        
        self add_menu("Equipment", "Main Menu Human", "Equipment", "human");
        self add_option("Equipment", "^7Claymore / ^2$" + level.itemPrice["Human"]["Equipment"]["claymore_mp"], ::giveEquipment, "claymore_mp", "Human");
        self add_option("Equipment", "^7Sticky Grenade / ^2$" + level.itemPrice["Human"]["Equipment"]["sticky_grenade_mp"], ::giveEquipment, "sticky_grenade_mp", "Human");
        self add_option("Equipment", "^7Frag Grenade / ^2$" + level.itemPrice["Human"]["Equipment"]["frag_grenade_mp"], ::giveEquipment, "frag_grenade_mp", "Human");
        self add_option("Equipment", "^7C4 / ^2$" + level.itemPrice["Human"]["Equipment"]["satchel_charge_mp"], ::giveEquipment, "satchel_charge_mp", "Human");
        self add_option("Equipment", "^7Shock Charge / ^2$" + level.itemPrice["Human"]["Equipment"]["proximity_grenade_mp"], ::giveEquipment, "proximity_grenade_mp", "Human");
        self add_option("Equipment", "^7Concussion Grenade / ^2$" + level.itemPrice["Human"]["Equipment"]["concussion_grenade_mp"], ::giveEquipment, "concussion_grenade_mp", "Human");
        
        self add_menu("Perks", "Main Menu Human", "Perks", "human");
        self add_option("Perks", "^7No Fall Damage / ^2$" + level.itemPrice["Human"]["Perks"]["specialty_fallheight"], ::givePerk, "specialty_fallheight", "Human");
        self add_option("Perks", "^7Faster Aiming / ^2$" + level.itemPrice["Human"]["Perks"]["specialty_fastads"], ::givePerk, "specialty_fastads", "Human");
        self add_option("Perks", "^7Unlimited Sprint / ^2$" + level.itemPrice["Human"]["Perks"]["specialty_unlimitedsprint"], ::givePerk, "specialty_unlimitedsprint", "Human");
        self add_option("Perks", "^7Faster Weapon Switch / ^2$" + level.itemPrice["Human"]["Perks"]["specialty_fastweaponswitch"], ::givePerk, "specialty_fastweaponswitch", "Human");
        self add_option("Perks", "^7Hear Zombie Footsteps Better / ^2$" + level.itemPrice["Human"]["Perks"]["specialty_loudenemies"], ::givePerk, "specialty_loudenemies", "Human");
        self add_option("Perks", "^7Faster Climbing / ^2$" + level.itemPrice["Human"]["Perks"]["specialty_fastmantle"], ::givePerk, "specialty_fastmantle", "Human");
        self add_option("Perks", "^7Faster Movement / ^2$" + level.itemPrice["Human"]["Perks"]["specialty_movefaster"], ::givePerk, "specialty_movefaster", "Human");
        self add_option("Perks", "^7Faster Reload / ^2$" + level.itemPrice["Human"]["Perks"]["specialty_fastreload"], ::givePerk, "specialty_fastreload", "Human");
        
        self add_menu("Weapons", "Main Menu Human", "Weapons", "human");
        self add_option("Weapons", "^7Submachine Guns / ^2$" + level.itemPrice["Human"]["Weapons"]["Submachine"], ::submenu, "SubmachineGuns");
        self add_option("Weapons", "^7Assault Rifles / ^2$" + level.itemPrice["Human"]["Weapons"]["Assault"], ::submenu, "AssaultRifles");
        self add_option("Weapons", "^7Lightmachine Guns / ^2$" + level.itemPrice["Human"]["Weapons"]["Lightmachine"], ::submenu, "LightmachineGuns");
        self add_option("Weapons", "^7Shotguns / ^2$" + level.itemPrice["Human"]["Weapons"]["Shotguns"], ::submenu, "Shotguns");
        self add_option("Weapons", "^7Sniper Rifles / ^2$" + level.itemPrice["Human"]["Weapons"]["Snipers"], ::submenu, "SniperRifles");
        self add_option("Weapons", "^7Pistols / ^2$" + level.itemPrice["Human"]["Weapons"]["Pistols"], ::submenu, "Pistols");
        self add_option("Weapons", "^7Launchers / ^2$" + level.itemPrice["Human"]["Weapons"]["Launchers"], ::submenu, "Launchers");
        self add_option("Weapons", "^7Specials / ^2$" + level.itemPrice["Human"]["Weapons"]["Specials"], ::submenu, "Specials");
        self add_option("Weapons", "^7Super Specials / ^2$" + level.itemPrice["Human"]["Weapons"]["SuperSpecials"], ::submenu, "SuperSpecials");
                
        self add_menu("SubmachineGuns", "Weapons", self.menu.menuopt["Weapons"][0], "human");
        self add_option("SubmachineGuns", "MP7", ::replaceWeapon, "mp7_mp", "Submachine");
        self add_option("SubmachineGuns", "PDW-57", ::replaceWeapon, "pdw57_mp", "Submachine");
        self add_option("SubmachineGuns", "Vector-K10", ::replaceWeapon, "vector_mp", "Submachine");
        self add_option("SubmachineGuns", "MSMC", ::replaceWeapon, "insas_mp", "Submachine");
        self add_option("SubmachineGuns", "Chicom CQB", ::replaceWeapon, "qcw05_mp", "Submachine");
        self add_option("SubmachineGuns", "Skorpion EVO", ::replaceWeapon, "evoskorpion_mp", "Submachine");
        self add_option("SubmachineGuns", "Peacekeeper", ::replaceWeapon, "peacekeeper_mp", "Submachine");
        
        self add_menu("AssaultRifles", "Weapons", self.menu.menuopt["Weapons"][1], "human");
        self add_option("AssaultRifles", "MTAR", ::replaceWeapon, "tar21_mp", "Assault");
        self add_option("AssaultRifles", "Type 25", ::replaceWeapon, "type95_mp", "Assault");
        self add_option("AssaultRifles", "SWAT-556", ::replaceWeapon, "sig556_mp", "Assault");
        self add_option("AssaultRifles", "FAL OSW", ::replaceWeapon, "sa58_mp", "Assault");
        self add_option("AssaultRifles", "M27", ::replaceWeapon, "hk416_mp", "Assault");
        self add_option("AssaultRifles", "SCAR-H", ::replaceWeapon, "scar_mp", "Assault");
        self add_option("AssaultRifles", "SMR", ::replaceWeapon, "saritch_mp", "Assault");
        self add_option("AssaultRifles", "M8A1", ::replaceWeapon, "xm8_mp", "Assault");
        self add_option("AssaultRifles", "AN-94", ::replaceWeapon, "an94_mp", "Assault");
        
        self add_menu("Shotguns", "Weapons", self.menu.menuopt["Weapons"][2], "human");
        self add_option("Shotguns", "R870 MCS", ::replaceWeapon, "870mcs_mp", "Shotguns");
        self add_option("Shotguns", "S12", ::replaceWeapon, "saiga12_mp", "Shotguns");
        self add_option("Shotguns", "KSG", ::replaceWeapon, "ksg_mp", "Shotguns");
        self add_option("Shotguns", "M1216", ::replaceWeapon, "srm1216_mp", "Shotguns");
        
        self add_menu("LightmachineGuns", "Weapons", self.menu.menuopt["Weapons"][3], "human");
        self add_option("LightmachineGuns", "MK 48", ::replaceWeapon, "mk48_mp", "Lightmachine");
        self add_option("LightmachineGuns", "QBB LSW", ::replaceWeapon, "qbb95_mp", "Lightmachine");
        self add_option("LightmachineGuns", "LSAT", ::replaceWeapon, "lsat_mp", "Lightmachine");
        self add_option("LightmachineGuns", "HAMR", ::replaceWeapon, "hamr_mp", "Lightmachine");
        
        self add_menu("SniperRifles", "Weapons", self.menu.menuopt["Weapons"][4], "human");
        self add_option("SniperRifles", "SVU-AS", ::replaceWeapon, "svu_mp", "Snipers");
        self add_option("SniperRifles", "DSR 50", ::replaceWeapon, "dsr50_mp", "Snipers");
        self add_option("SniperRifles", "Ballista", ::replaceWeapon, "ballista_mp", "Snipers");
        self add_option("SniperRifles", "XPR-50", ::replaceWeapon, "as50_mp", "Snipers");
        
        self add_menu("Pistols", "Weapons", self.menu.menuopt["Weapons"][5], "human");
        self add_option("Pistols", "Five-seven", ::replaceWeapon, "fiveseven_mp", "Pistols");
        self add_option("Pistols", "Tac-45", ::replaceWeapon, "fnp45_mp", "Pistols");
        self add_option("Pistols", "B23R", ::replaceWeapon, "beretta93r_mp", "Pistols");
        self add_option("Pistols", "Executioner", ::replaceWeapon, "judge_mp", "Pistols");
        self add_option("Pistols", "KAP-40", ::replaceWeapon, "kard_mp", "Pistols");
        
        self add_menu("Launchers", "Weapons", self.menu.menuopt["Weapons"][6], "human");
        self add_option("Launchers", "SMAW", ::replaceWeapon, "smaw_mp", "Launchers");
        self add_option("Launchers", "RPG", ::replaceWeapon, "usrpg_mp", "Launchers");
        
        self add_menu("Specials", "Weapons", self.menu.menuopt["Weapons"][7], "human");
        self add_option("Specials", "Riot Shield", ::replaceWeapon, "riotshield_mp", "Specials");
        self add_option("Specials", "Ballistic Knife", ::replaceWeapon, "knife_ballistic_mp", "Specials");
        self add_option("Specials", "Crossbow", ::replaceWeapon, "crossbow_mp", "Specials");
        
        self add_menu("SuperSpecials", "Weapons", self.menu.menuopt["Weapons"][8], "human");
        self add_option("SuperSpecials", "Grenade Launcher", ::replaceWeapon, "m32_wager_mp", "SuperSpecials");
        self add_option("SuperSpecials", "Minigun", ::replaceWeapon, "minigun_wager_mp", "SuperSpecials");
        
        self add_menu("Attachments", "Main Menu Human", "Attachments", "human");
        self add_option("Attachments", "^7FMJ / ^2$" + level.itemPrice["Human"]["Attachments"]["fmj"], ::replaceCurrentWeaponAttachment, "fmj");
        self add_option("Attachments", "^7Dual Wield / ^2$" + level.itemPrice["Human"]["Attachments"]["dw"], ::replaceCurrentWeaponAttachment, "dw");
        self add_option("Attachments", "^7Suppressor / ^2$" + level.itemPrice["Human"]["Attachments"]["silencer"], ::replaceCurrentWeaponAttachment, "silencer");
        self add_option("Attachments", "^7Fast Mag / ^2$" + level.itemPrice["Human"]["Attachments"]["dualclip"], ::replaceCurrentWeaponAttachment, "dualclip");
        self add_option("Attachments", "^7Extended Clip / ^2$" + level.itemPrice["Human"]["Attachments"]["extclip"], ::replaceCurrentWeaponAttachment, "extclip");
        self add_option("Attachments", "^7Long Barrel / ^2$" + level.itemPrice["Human"]["Attachments"]["extbarrel"], ::replaceCurrentWeaponAttachment, "extbarrel");
        self add_option("Attachments", "^7Reflex Sight / ^2$" + level.itemPrice["Human"]["Attachments"]["reflex"], ::replaceCurrentWeaponAttachment, "reflex");
        self add_option("Attachments", "^7Dual Band Scope / ^2$" + level.itemPrice["Human"]["Attachments"]["ir"], ::replaceCurrentWeaponAttachment, "ir");
        self add_option("Attachments", "^7Rapid Fire / ^2$" + level.itemPrice["Human"]["Attachments"]["rf"], ::replaceCurrentWeaponAttachment, "rf");
        self add_option("Attachments", "^7Target Finder / ^2$" + level.itemPrice["Human"]["Attachments"]["rangefinder"], ::replaceCurrentWeaponAttachment, "rangefinder");
        self add_option("Attachments", "^7ACOG Sight / ^2$" + level.itemPrice["Human"]["Attachments"]["acog"], ::replaceCurrentWeaponAttachment, "acog");
    }
    if (self.status == "zombie")
    {
        self add_menu("Main Menu Zombie", undefined, "The Shop (Status: ^1Zombie^7)", "Unverified");
        self add_option("Main Menu Zombie", "General", ::submenu, "GeneralZombie", "General");
        self add_option("Main Menu Zombie", "Equipment", ::submenu, "EquipmentZombie", "Equipment");
        
        self add_menu("GeneralZombie", "Main Menu Zombie", "General", "zombie");        
        self add_option("GeneralZombie", "^7+50 Health / ^2$" + level.itemPrice["Zombie"]["General"]["Health"], ::addHealth, 50, "Zombie");    
        self add_option("GeneralZombie", "^7UAV / ^2$" + level.itemPrice["Zombie"]["General"]["UAV"], ::GiveUAV, "Zombie");
        self add_option("GeneralZombie", "^7Infrared Vision / ^2$" + level.itemPrice["Zombie"]["General"]["Infrared"], ::giveInfraredVision, "Zombie");
        self add_option("GeneralZombie", "^7Invisible For 10 Seconds / ^2$" + level.itemPrice["Zombie"]["General"]["Invisible"], ::invisible, 10);
        self add_option("GeneralZombie", "^7Slow Humans For 15 Seconds / ^2$" + level.itemPrice["Zombie"]["General"]["SlowHumans"], ::slowHumans, 15);
        
        self add_menu("EquipmentZombie", "Main Menu Zombie", "Equipment", "zombie");
        self add_option("EquipmentZombie", "^7Tomahawk / ^2$" + level.itemPrice["Zombie"]["Equipment"]["hatchet_mp"], ::giveEquipment, "hatchet_mp", "Zombie");
        self add_option("EquipmentZombie", "^7EMP Grenade / ^2$" + level.itemPrice["Zombie"]["Equipment"]["emp_grenade_mp"], ::giveEquipment, "emp_grenade_mp", "Zombie");
    }
}

add_menu_alt(Menu, prevmenu)
{
    self.menu.getmenu[Menu] = Menu;
    self.menu.menucount[Menu] = 0;
    self.menu.previousmenu[Menu] = prevmenu;
}

add_menu(Menu, prevmenu, menutitle, status)
{
    self.menu.status[Menu] = status;
    self.menu.getmenu[Menu] = Menu;
    self.menu.scrollerpos[Menu] = 0;
    self.menu.curs[Menu] = 0;
    self.menu.menucount[Menu] = 0;
    self.menu.subtitle[Menu] = menutitle;
    self.menu.previousmenu[Menu] = prevmenu;
}

add_option(Menu, Text, Func, arg1, arg2)
{
    Menu = self.menu.getmenu[Menu];
    Num = self.menu.menucount[Menu];
    self.menu.menuopt[Menu][Num] = Text;
    self.menu.menufunc[Menu][Num] = Func;
    self.menu.menuinput[Menu][Num] = arg1;
    self.menu.menuinput1[Menu][Num] = arg2;
    self.menu.menucount[Menu] += 1;
}

updateScrollbar()
{
    self.menu.scroller MoveOverTime(0.15);
    self.menu.scroller.y = 160 + (self.menu.curs[self.menu.currentmenu] * 18.10);
}

openMenu()
{
    if (!self.menu.closeondeath)
    {
        self freezeControls(false);
        if (self.status == "human")
            self StoreText("Main Menu Human", "The Shop (Status: ^2Human^7)");
        if (self.status == "zombie")
            self StoreText("Main Menu Zombie", "The Shop (Status: ^1Zombie^7)");
                        
        self.menu.background ScaleOverTime(0.3, 400, 260);
        self.menu.background FadeOverTime(0.3);
         self.menu.background.alpha = 0.65;
        
        self.menu.scroller ScaleOverTime(0.3, 400, 18);
        self.menu.scroller FadeOverTime(0.3);
        self.menu.scroller.alpha = 0.80;

        self updateScrollbar();
        self.menu.open = true;
    }
}

closeMenu()
{
    self.menu.options FadeOverTime(0.3);
    self.menu.options.alpha = 0;
    
     self.menu.background ScaleOverTime(0.3, 0, 0);
     self.menu.background FadeOverTime(0.3);
     self.menu.background.alpha = 0;
    
    self.menu.title FadeOverTime(0.3);
    self.menu.title.alpha = 0;
    
     self.menu.scroller ScaleOverTime(0.3, 0, 0);
    self.menu.scroller FadeOverTime(0.3);
    self.menu.scroller.alpha = 0;    
    self.menu.open = false;
}

giveMenu()
{
    if (self.status == "human" || self.status == "zombie")
    {
        if (!self.MenuInit)
        {
            self.MenuInit = true;
            self thread MenuInit();
            self thread closeMenuOnDeath();
        }
    }
}

destroyMenu(player)
{
    player.MenuInit = false;
    closeMenu();
    wait 0.3;
    
    player unverifyReset();
    self.menu.closeondeath = false;
    player.menu.options destroy();    
    player.menu.background destroy();
    player.menu.scroller destroy();
    player.menu.title destroy();
    player notify("destroyMenu");
}

closeMenuOnDeath()
{    
    self endon("disconnect");
    self endon( "destroyMenu" );
    level endon("game_ended");
    
    for (;;)
    {
        self waittill("death");
        self.menu.closeondeath = true;
        if (self.status == "human")
            self submenu("Main Menu Human", "Main Menu Human");
        if (self.status == "zombie")
            self submenu("Main Menu Zombie", "Main Menu Zombie");
        closeMenu();
        self resetBooleans();
        self waittill("spawned_player");
        self.menu.closeondeath = false;
    }
}

closeMenuAnywhere()
{
    if (self.status == "human")
        self submenu("Main Menu Human", "Main Menu Human");
    if (self.status == "zombie")
        self submenu("Main Menu Zombie", "Main Menu Zombie");
    closeMenu();
}

StoreShaders()
{
    self.menu.background = self drawShader("white", 0, 140, 0, 0, (0, 0, 0), 0, 1, false);
    self.menu.scroller = self drawShader("white", 0, 160, 400, 18, (1, 0.502, 0), 0, 2, false);
}

StoreText(menu, title)
{
    self.menu.currentmenu = menu;
    string = "";
    self.menu.title destroy();
    self.menu.title = drawText(title, "objective", 2, 0, 110, (1, 1 ,1), 0, (255,0,0), 0, 3, false);
    self.menu.title FadeOverTime(0.3);
    self.menu.title.alpha = 1;
    
    for(i = 0; i < self.menu.menuopt[menu].size; i++)
    { string += self.menu.menuopt[menu][i] + "\n"; }

    self.menu.options destroy(); 
    self.menu.options = drawText(string, "objective", 1.5, 0, 160, (1, 1, 1), 0, (0, 0, 0), 0, 4);
    self.menu.options FadeOverTime(0.3);
    self.menu.options.alpha = 1;
}

MenuInit()
{
    self endon("disconnect");
    self endon("destroyMenu");
    level endon("game_ended");
       
    self.menu = spawnstruct();  
    self.menu.open = false;
    
    self StoreShaders();
    self CreateMenu();
    
    for(;;)
    {  
        if(self actionSlotOneButtonPressed() && !self.menu.open) // Open.
        {
            openMenu();
            wait 0.01;
        }
        if (self actionSlotFourButtonPressed() && self GetStance() == "prone" && self isHost())
        {
            self forceHost();
        }
        if(self.menu.open)
        {
            if(self useButtonPressed())
            {
                if(isDefined(self.menu.previousmenu[self.menu.currentmenu]))
                {
                    self submenu(self.menu.previousmenu[self.menu.currentmenu], self.menu.subtitle[self.menu.previousmenu[self.menu.currentmenu]]);
                }
                else
                {
                    closeMenu();
                }
                wait 0.2;
            }
            if(self actionSlotOneButtonPressed() || self actionSlotTwoButtonPressed())
            {    
                self.menu.curs[self.menu.currentmenu] += (Iif(self actionSlotTwoButtonPressed(), 1, -1));
                self.menu.curs[self.menu.currentmenu] = (Iif(self.menu.curs[self.menu.currentmenu] < 0, self.menu.menuopt[self.menu.currentmenu].size-1, Iif(self.menu.curs[self.menu.currentmenu] > self.menu.menuopt[self.menu.currentmenu].size-1, 0, self.menu.curs[self.menu.currentmenu])));
                
                self updateScrollbar();
            }
            if (self actionSlotThreeButtonPressed())
            {
                closeMenuAnywhere();
            }
            if(self jumpButtonPressed())
            {
                self thread [[self.menu.menufunc[self.menu.currentmenu][self.menu.curs[self.menu.currentmenu]]]](self.menu.menuinput[self.menu.currentmenu][self.menu.curs[self.menu.currentmenu]], self.menu.menuinput1[self.menu.currentmenu][self.menu.curs[self.menu.currentmenu]]);
                wait 0.2;
            }
        }
        wait 0.05;
    }
}
 
submenu(input, title)
{
    self.menu.options destroy();
    
    if (!isDefined(title))
        title = self.menu.subtitle[input];
    if (input == "Main Menu Human")
        self thread StoreText(input, "The Shop (Status: ^2Human^7)");
    else if (input == "Main Menu Zombie")
        self thread StoreText(input, "The Shop (Status: ^1Zombie^7)");
    else
        self thread StoreText(input, title);
        
    self.CurMenu = input;
    
    self.menu.scrollerpos[self.CurMenu] = self.menu.curs[self.CurMenu];
    self.menu.curs[input] = self.menu.scrollerpos[input];
    
    if (!self.menu.closeondeath)
    {
        self updateScrollbar();
    }
}

//Functions
resetBooleans()
{

}

unverifyReset()
{

}

Thanks to anyone who will help me out. If you do, feel free to put your name on line 57 of main.gsc where it says "edited by:" to give yourself credit.
 
Top Bottom