To add this script first copy n' paste this code into Notepad++ then save it as a ".txt" after edit the change ".txt" to ".gsc" -- if you don't know how to do that open up a random folder look for "View" at the top and click it. A drop down menu should appear and you'll see "Show" at the bottom, click it and you'll see "File name extension" and should be able to change ".txt" to ".gsc"
--You can name the file whatever you want, just make sure it ends with ".gsc"
After the File name extension change add the ".gsc" to the Plutonium folders by:
Win + R and Run "%localappdata%" then search for "Plutonium" and go the folders as shown: Local/Plutonium/storage/t6/scripts/zm
Raw Code:
#include common_scripts\utility;
#include maps\mp\_utility;
init()
{
level thread global_player_connect_handler();
}
// -------------------------
// GLOBAL PLAYER CONNECT
// -------------------------
global_player_connect_handler()
{
for(;;)
{
level waittill("connected", player);
// make sure EVERY client gets the code
player thread player_spawn_handler();
}
}
// -------------------------
// PLAYER SPAWN HANDLER
// -------------------------
player_spawn_handler()
{
self endon("disconnect");
level endon("game_ended");
for(;;)
{
self waittill("spawned_player");
// ensure each new spawn has these set
self.jugActive = false;
self.health_initialized = false;
self thread enforce_health_system();
self thread monitor_perks();
self thread revive_handler();
}
}
// -------------------------
// ENFORCE HEALTH (RUNS EVERY 250ms)
// -------------------------
enforce_health_system()
{
self endon("disconnect");
level endon("game_ended");
for(;;)
{
wait 0.25;
if (self.jugActive)
{
if (self.maxhealth != 300)
{
self.maxhealth = 300;
self.health = self.maxhealth;
}
}
else
{
if (self.maxhealth != 150)
{
self.maxhealth = 150;
self.health = self.maxhealth;
}
}
}
}
// -------------------------
// PERK MONITOR
// -------------------------
monitor_perks()
{
self endon("disconnect");
level endon("game_ended");
for(;;)
{
wait 0.25;
currentJug = self hasPerk("specialty_armorvest");
if (!isDefined(self.jugActive) || currentJug != self.jugActive)
{
self.jugActive = currentJug;
if (currentJug)
{
self.maxhealth = 300;
self.health = self.maxhealth;
self IPrintLnBold("^2Juggernog: 300 HP");
}
else
{
self.maxhealth = 150;
self.health = self.maxhealth;
self IPrintLnBold("^1Jug lost: 150 HP");
}
}
}
}
// -------------------------
// REVIVE HANDLER
// -------------------------
revive_handler()
{
self endon("disconnect");
level endon("game_ended");
for(;;)
{
self waittill("player_revived");
// revive resets health → reapply our rules
self.maxhealth = 150;
self.health = self.maxhealth;
self IPrintLnBold("^3Revived → HP reset to 150");
}
}
