--print("Chrome") --Thank you royal, once again AddEventCallback("mvm_reset_stats", function () for _, player in pairs(ents.GetAllPlayers()) do player.m_debugOverlays = player.m_debugOverlays & ~0x02000000 end end) function setRedBossCallbacks(_, activator) local callbacks = {} local terminated = false local teleportingOut = false activator.m_debugOverlays = activator.m_debugOverlays | 0x02000000 local function removeCallbacks(player, callbacks) if not IsValid(player) then return end for _, callbackId in pairs(callbacks) do player:RemoveCallback(callbackId) end end local function terminate() if terminated then return end terminated = true activator.m_debugOverlays = activator.m_debugOverlays & ~0x02000000 removeCallbacks(activator, callbacks) end callbacks.hurtpre = activator:AddCallback(ON_DAMAGE_RECEIVED_PRE, function(_, damageInfo) -- just in case if not activator:IsAlive() then return end local curHealth = activator.m_iHealth local damage = damageInfo.Damage if (damageInfo.DamageType & DMG_CRITICAL > 0) then damage = damageInfo.Damage * 3.1 end if teleportingOut == true then return false end --If the incoming damage is lethal, set our health to 1 instead. if curHealth - (damage + 1) <= 0 and damageInfo.Attacker.m_iTeamNum ~= activator.m_iTeamNum and activator:InCond(5) == false then activator:RemoveCond(22) activator:RemoveCond(25) teleportingOut = true damageInfo.Damage = 0 damageInfo.DamageType = DMG_GENERIC -- set health to 1 local setHealthDmgInfo = { Attacker = damageInfo.Attacker, Inflictor = damageInfo.Inflictor, Weapon = damageInfo.Weapon, Damage = curHealth - 2, CritType = 0, DamageType = damageInfo.DamageType, DamageCustom = damageInfo.DamageCustom, DamagePosition = damageInfo.DamagePosition, DamageForce = damageInfo.DamageForce, ReportedPosition = damageInfo.ReportedPosition, } for _, player in pairs(ents.GetAllPlayers()) do --print(player) if player.m_iTeamNum == 1 and player:IsAlive() and player.m_bIsMiniBoss == 1 then local message local insultAccessControl = { "{EEEEEE}Monochrome{reset} : {FFFFFF}ACCESS DENIED, {red}Access Control", "{EEEEEE}Monochrome{reset} : {FFFFFF}THOSE SHOULDERS OF YOURS ARE IN >mintCondition, {red}Access Control", "{EEEEEE}Monochrome{reset} : {FFFFFF}ONCE THE PIECES OF BEEF JERKY YOU CALL ALLIES ARE DEAD, I'LL BEAT YOUR HEAD IN WITH YOUR OWN SEVERED LIMBS.", "{EEEEEE}Monochrome{reset} : {FFFFFF}you:SetAbsOrigin(away) AND HIDE.", "{EEEEEE}Monochrome{reset} : {FFFFFF}YOU'RE AS USELESS AS YOU'VE ALWAYS BEEN, {red}Access Control", "{EEEEEE}Monochrome{reset} : {FFFFFF}OH {red}Access Control{FFFFFF}! you:forgot(something)!", } local insultAccessControlFunny = { "{ffAAFF}MonOwOchrome{reset} : {FFFFFF}ACCESS DENIED, {red}Access Control", "{ffAAFF}MonOwOchrome{reset} : {FFFFFF}THOSE SHOULDERS OF YOURS ARE IN >mintCondition, {red}Access Control", "{ffAAFF}MonOwOchrome{reset} : {FFFFFF}ONCE THE PIECES OF BEEF JERKY YOU CALL ALLIES ARE DEAD, I'LL BEAT YOUR HEAD IN WITH YOUR OWN SEVERED LIMBS.", "{ffAAFF}MonOwOchrome{reset} : {FFFFFF}you:SetAbsOrigin(away) AND HIDE.", "{ffAAFF}MonOwOchrome{reset} : {FFFFFF}YOU'RE AS USELESS AS YOU'VE ALWAYS BEEN, {red}Access Control", "{ffAAFF}MonOwOchrome{reset} : {FFFFFF}OH {red}Access Control{FFFFFF}! you:forgot(something)!", } --message = "No message" if player:GetAttributeValue("fire input on kill", false) == "popscript^$insultVictim^" then message = insultAccessControl[math.random(#insultAccessControl)] elseif player:GetAttributeValue("fire input on kill", false) == "popscript^$insultVictimFunny^" then message = insultAccessControlFunny[math.random(#insultAccessControlFunny)] end if message ~= nil then for _, player in pairs(ents.GetAllPlayers()) do player:AcceptInput("$DisplayTextChat", message) end end end end activator:TakeDamage(setHealthDmgInfo) activator:AddCond(5, 99, activator) timer.Simple(2.5 ,function() if activator:IsValid() then local teleParticle = ents.CreateWithKeys("info_particle_system", { effect_name = "teleportedin_red", start_active = 1, flag_as_weather = 0, }, true, true) teleParticle:SetAbsOrigin(activator:GetAbsOrigin()) teleParticle:Start() allPlayers = ents.GetAllPlayers() for _, player in pairs(allPlayers) do player:AcceptInput("$PlaySoundToSelf", "weapons/teleporter_send.wav") end local teleParticle2 = ents.CreateWithKeys("info_particle_system", { effect_name = "wrenchmotron_teleport_beam", start_active = 1, flag_as_weather = 0, }, true, true) teleParticle2:SetAbsOrigin(activator:GetAbsOrigin()) teleParticle2:Start() timer.Simple(1, function() if activator:IsValid() then activator:AddCond(66, 99, activator) end teleParticle:Remove() teleParticle2:Remove() terminate() teleportingOut = false end) end end) timer.Simple(3, function() if activator:IsValid() then activator:BotCommand("despawn") end end) return true end end) callbacks.died = activator:AddCallback(ON_DEATH, function() terminate() end) callbacks.removed = activator:AddCallback(ON_REMOVE, function() terminate() end) callbacks.spawned = activator:AddCallback(ON_SPAWN, function() terminate() end) end