ents.AddCreateCallback("item_currencypack_custom", function(pack) pack:AddCallback(ON_SHOULD_COLLIDE, function(_, other) if other.m_iTeamNum == 2 and other:IsPlayer() and other.moneycooldown == 0 then other.moneycooldown = 300 if other.m_iClass == 3 or other.m_iClass == 5 or other.m_iClass == 6 or other.m_iClass == 9 then other:AcceptInput("speakresponseconcept", "TLK_MVM_ENCOURAGE_MONEY") elseif other.m_iClass ~= 3 and other.m_iClass ~= 5 and other.m_iClass ~= 6 and other.m_iClass ~= 9 then other:AcceptInput("speakresponseconcept", "TLK_PLAYER_POSITIVE") end end end) end) function OnPlayerConnected(player) player.kills = 0 player.killtime = 0 player.aaacooldown = 0 player.moneycooldown = 0 if player:IsRealPlayer() then player:AddCallback(ON_DEATH, function() player.kills = 0 player.killtime = 0 player.aaacooldown = 0 player.moneycooldown = 0 end) end end function OnGameTick() for _, player in pairs(ents.GetAllPlayers()) do if player:IsRealPlayer() then if player.killtime > 0 then player.killtime = player.killtime - 1 end if player.killtime == 0 then player.kills = 0 end if player.aaacooldown > 0 then player.aaacooldown = player.aaacooldown - 1 end if player.moneycooldown > 0 then player.moneycooldown = player.moneycooldown - 1 end end end end function OnWaveSuccess() for _, player in pairs(ents.GetAllPlayers()) do if player.m_iTeamNum ~= 2 or player:IsBot() then return end if player.m_iClass == 3 or player.m_iClass == 5 or player.m_iClass == 6 or player.m_iClass == 9 then player:AcceptInput("speakresponseconcept", "TLK_MVM_WAVE_WIN") elseif player.m_iClass ~= 3 and player.m_iClass ~= 5 and player.m_iClass ~= 6 and player.m_iClass ~= 9 then player:AcceptInput("speakresponseconcept", "TLK_PLAYER_CHEERS") end end end function OnWaveFail() local delay = math.random(1, 3) timer.Simple(delay, function() for _, player in pairs(ents.GetAllPlayers()) do if player.m_iTeamNum ~= 2 then return end player:AcceptInput("speakresponseconcept", "TLK_MVM_WAVE_LOSE") end end) end function OnWaveInit() for _, player in pairs(ents.GetAllPlayers()) do if player:IsBot() then player:RemoveAllCallbacks() end end local lossrelay = ents.FindByName("cap_destroy_relay") if lossrelay:IsValid() then lossrelay:AcceptInput("addoutput", "ontrigger popscript:$redjeers:0:0:-1") end end function OnWaveSpawnBot(bot) bot:AddCallback(ON_DAMAGE_RECEIVED_PRE, function(_, damageinfo) local attacker = damageinfo.Attacker if damageinfo.Damage > bot.m_iHealth then attacker.killtime = 480 attacker.kills = attacker.kills + 1 if attacker.m_iHealth < 51 then return end if attacker.kills == 10 or attacker.kills == 20 or attacker.kills == 30 then attacker:AcceptInput("speakresponseconcept", "TLK_MVM_TAUNT") end if attacker.kills > 40 and attacker.aaacooldown == 0 then attacker:AcceptInput("speakresponseconcept", "HALLOWEENLONGFALL") attacker.aaacooldown = 900 end end end) bot:AddCallback(ON_DEATH, function() bot:RemoveAllCallbacks() end) end function redjeers() for _, player in pairs(ents.GetAllPlayers()) do if player.m_iTeamNum == 2 then player:AcceptInput("speakresponseconcept", "TLK_PLAYER_JEERS") elseif player.m_iTeamNum == 3 then player:AcceptInput("speakresponseconcept", "TLK_PLAYER_CHEERS") end end end function check(_, activator) activator:AcceptInput("$displaytextchat", "kills : " .. activator.kills .. "") activator:AcceptInput("$displaytextchat", "kill time : " .. activator.killtime .. "") end function setto60(_, activator) activator.kills = 60 activator.killtime = 480 end