local metalinfection = 0 local function MetalVirus(player) if player.speed >= 28 * FRACUNIT then metalinfection = $ - 3 end metalinfection = $ + 1 if metalinfection == 100 then player.rings = 0 P_DamageMobj(player.mo, 0, DMG_INSTAKILL) metalinfection = 0 end if metalinfection < 0 then metalinfection = 0 end end local function ResetInfection() metalinfection = 0 end addHook("PlayerThink", MetalVirus) addHook("PlayerSpawn", ResetInfection) local function infectionspread(v, player) if player.mo and player.mo.valid if not player.mo.valid return end v.drawString(5, 60, "Infection Spread:", V_YELLOWMAP|V_PERPLAYER) v.drawString(140, 60, metalinfection, V_PERPLAYER) end end hud.add(infectionspread, "game")