--created by wacev --feel free to copy the script for any needs function addCashOnKillWeak() --is called by doing an input to popscript $addCashOnKillWeak for _, player in pairs(ents.GetAllPlayers()) do --get a table of all players, and loop the function inside the do statment for the entire table if player:IsRealPlayer() then --if the player is a real player and not a bot, continue player:AddCurrency(5) -- add 5 to that player end end end function addCashOnKillSpecial() for _, player in pairs(ents.GetAllPlayers()) do if player:IsRealPlayer() then player:AddCurrency(50) end end end function addCashOnKillTank() for _, player in pairs(ents.GetAllPlayers()) do if player:IsRealPlayer() then player:AddCurrency(300) end end end function boomerExplode(_,activator) --is called by doing an input to popscript $boomerExplode with activator parameiter for _, player in pairs(ents.FindInSphere(activator:GetAbsOrigin(), 256)) do --get all players in a 256 hammer unit radius. if player:IsPlayer() then -- if that player is a player or bot, continue player:AddCond(24,15) --add player cond for 15 seconds player:StunPlayer(1.25,0.4,TF_STUNFLAGS_LOSERSTATE,activator) --simulate the boomer kb stun from l4d2 end end end function OnGameTick() --runs every tick (1/66) for _, player in pairs(ents.GetAllPlayers()) do if player:IsRealPlayer() then --slow down based on health % if (player:InCond(32) == false) then --dont slow player if they have used energy drink local curHealth = player.m_iHealth --m_i---- are net props, complex stuff, m_iHealth is the entity's health (must be a bot or a player), m_iTeamNum is the player's or bot's team num, 2 is red, 3 is blu if 40 > curHealth and 1 < curHealth then player:SetAttributeValue("CARD: move speed bonus", 0.75) --add this attribute elseif 1 == curHealth then player:SetAttributeValue("CARD: move speed bonus", 0.5) else player:SetAttributeValue("CARD: move speed bonus", nil) --add this attribute with a nil value to remove it end else player:SetAttributeValue("CARD: move speed bonus", nil) player:SetAttributeValue("move speed bonus", nil) --negates the common infected slow down end end end end