This script makes it so if there are 8 or less zombies you have to hold the use button in order to activate the nuke
Also adds a delay so you cant accidently pick up a powerup if you don't want to
Can remove delay or shorten the delay on line 7
Can change required zombie amount for nuke on line 8


https://drive.google.com/file/d/1sPxbV2YT6YiuLDF4VPspEKH6TvhuMVtk/view?usp=sharing
https://www.virustotal.com/gui/file/0e579e46ec19fbd294531cff283a8507bddc73cdf3211775d444a4b48fb87f92?nocache=1
vnm_420
Posts
-
PowerUp Safety -
Powerup Timer Countdown -
Game Timer -
Last Zombie FinderTells you where the last zombie is


Lines to change where text is displayed
Line 28 - LAST ZOMBIE - Position
Line 34: Distance number
Line 41: Meters awayThe last two numbers are x, y.
Bigger x moves it right.
Smaller/negative x moves it left.
Bigger y moves it down.
Smaller/negative y moves it up.https://drive.google.com/file/d/1cd6w1UWFqgvibgEC9iDjskSW2p2tqkO1/view?usp=sharing
-
Game TimerTimer that keeps track of total play time along with current round time and previous round time

Lines 26-28 allow you to change where its displayed
#include maps\mp_utility;
#include common_scripts\utility;
#include maps\mp\gametypes_zm_hud_util;init()
{
level thread onPlayerConnect();
}onPlayerConnect()
{
for(;;)
{
level waittill("connected", player);
player thread playerGameTimers();
}
}playerGameTimers()
{
self endon("disconnect");
level endon("end_game");flag_wait("initial_blackscreen_passed"); self.gameTimerHud = self createTimerHud("Game:", 400, 120); self.roundTimerHud = self createTimerHud("Round:", 400, 145); self.lastRoundTimerHud = self createTimerHud("Last:", 395, 170); gameSeconds = 0; roundSeconds = 0; lastRoundSeconds = 0; currentRound = getCurrentRound(); for(;;) { newRound = getCurrentRound(); if(newRound != currentRound) { lastRoundSeconds = roundSeconds; roundSeconds = 0; currentRound = newRound; } self.gameTimerHud setText("Game: " + formatTimer(gameSeconds)); self.roundTimerHud setText("Round: " + formatTimer(roundSeconds)); self.lastRoundTimerHud setText("Last: " + formatTimer(lastRoundSeconds)); wait 1; gameSeconds++; roundSeconds++; }}
createTimerHud(label, x, y)
{
hud = createFontString("small", 1.35);
hud setpoint("RIGHT", "TOP", x, y);
hud.alpha = 1;
hud.sort = 20;
hud.color = (1, 1, 1);
hud setText(label + " 00:00");
return hud;
}getCurrentRound()
{
if(isDefined(level.round_number))
return level.round_number;if(isDefined(level.round)) return level.round; if(isDefined(level.zombie_round)) return level.zombie_round; return 1;}
formatTimer(totalSeconds)
{
hours = 0;
minutes = 0;
seconds = totalSeconds;while(seconds >= 3600) { hours++; seconds -= 3600; } while(seconds >= 60) { minutes++; seconds -= 60; } if(hours > 0) return hours + ":" + twoDigits(minutes) + ":" + twoDigits(seconds); return minutes + ":" + twoDigits(seconds);}
twoDigits(value)
{
if(value < 10)
return "0" + value;return "" + value;}
-
Powerup Timer Countdownscript that displays power up timers
Lines 27-30 allow you to change where the timers are displayed on the screen

#include maps\mp_utility;
#include common_scripts\utility;
#include maps\mp\gametypes_zm_hud_util;
#include maps\mp\zombies_zm_powerups;init()
{
level thread onPlayerConnect();
}onPlayerConnect()
{
for(;;)
{
level waittill("connected", player);
player thread playerPowerupTimers();
}
}playerPowerupTimers()
{
self endon("disconnect");
level endon("end_game");flag_wait("initial_blackscreen_passed"); self.doublePointsTimer = self createPowerupTimerHud(-42, -36); self.instaKillTimer = self createPowerupTimerHud(-14, -36); self.fireSaleTimer = self createPowerupTimerHud(14, -36); self.zombieBloodTimer = self createPowerupTimerHud(42, -36); zombieBloodWasActive = false; zombieBloodSeconds = 0; zombieBloodTick = 0; for(;;) { self updatePowerupTimer(self.doublePointsTimer, getTeamPowerupTime("zombie_powerup_point_doubler_on", "zombie_powerup_point_doubler_time")); self updatePowerupTimer(self.instaKillTimer, getTeamPowerupTime("zombie_powerup_insta_kill_on", "zombie_powerup_insta_kill_time")); self updatePowerupTimer(self.fireSaleTimer, getGlobalPowerupTime("zombie_powerup_fire_sale_on", "zombie_powerup_fire_sale_time")); zombieBloodActive = self isZombieBloodActive(); if(zombieBloodActive && !zombieBloodWasActive) { zombieBloodSeconds = 30; zombieBloodTick = 0; } if(zombieBloodSeconds > 0) { self updatePowerupTimer(self.zombieBloodTimer, zombieBloodSeconds); zombieBloodTick++; if(zombieBloodTick >= 4) { zombieBloodSeconds--; zombieBloodTick = 0; } } else self updatePowerupTimer(self.zombieBloodTimer, 0); zombieBloodWasActive = zombieBloodActive; wait 0.25; }}
createPowerupTimerHud(x, y)
{
hud = createFontString("small", 1.25);
hud setpoint("CENTER", "BOTTOM", x, y);
hud.alpha = 0;
hud.sort = 30;
hud.color = (1, 1, 1);
return hud;
}updatePowerupTimer(hud, timeLeft)
{
if(!isDefined(hud))
return;if(timeLeft > 0) { hud.alpha = 1; hud setvalue(getWholeSeconds(timeLeft)); } else { hud setText(""); hud.alpha = 0; }}
getTeamPowerupTime(activeVar, timeVar)
{
if(!isDefined(level.zombie_vars))
return 0;team = "allies"; if(isDefined(self.team)) team = self.team; if(!isDefined(level.zombie_vars[team])) return 0; if(!isDefined(level.zombie_vars[team][activeVar])) return 0; if(!level.zombie_vars[team][activeVar]) return 0; if(!isDefined(level.zombie_vars[team][timeVar])) return 0; return level.zombie_vars[team][timeVar];}
getGlobalPowerupTime(activeVar, timeVar)
{
if(!isDefined(level.zombie_vars))
return 0;if(!isDefined(level.zombie_vars[activeVar])) return 0; if(!level.zombie_vars[activeVar]) return 0; if(!isDefined(level.zombie_vars[timeVar])) return 0; return level.zombie_vars[timeVar];}
getWholeSeconds(timeLeft)
{
seconds = 0;while(seconds < timeLeft) seconds++; return seconds;}
isZombieBloodActive()
{
if(isDefined(self.ignoreme) && self.ignoreme)
return true;if(isDefined(self.zombie_blood) && self.zombie_blood) return true; if(isDefined(self.zombie_blood_on) && self.zombie_blood_on) return true; if(isDefined(self.zombieblood) && self.zombieblood) return true; return false;}