----------------------------------------SENTRY BUSTER LUA ---------------------------------------------------------- local vectorMin = Vector(-300, -300, -300) local vectorMax = Vector(300, 300, 300) local vectorParticle = Vector(-90, 0, 0) function BusterSelfTimer(_, activator) if not activator then return end TimerSetDuration = 31 --local explodeownTimer local ExplodeownTimer ExplodeownTimer = timer.Create(1, function () TimerSetDuration = TimerSetDuration - 1 activator:AcceptInput("$DisplayTextCenter", "AUTO DETONATE IN: "..TimerSetDuration, activator) if TimerSetDuration <= 0 then --player:ShowHudText(BustText) activator:AcceptInput("$taunt", nil, activator) timer.Stop(ExplodeownTimer) end if activator:IsAlive() == false or activator:InCond(7) == true then timer.Stop(ExplodeownTimer) end end, 999) function OnWaveInit(wave) for _, player in pairs(ents.GetAllPlayers()) do --print(player) if player:IsRealPlayer() then timer.Stop(ExplodeownTimer) end end end end function ExplodeNow(_, player) if not player then return end TimerLookFor = timer.Create(0, function () if player:InCond(7) == true and player:IsAlive() and player.m_hActiveWeapon:GetItemName() == "Bust Caber" then local activatorOrigin = player:GetAbsOrigin() local activeWeapon = player.m_hActiveWeapon:GetItemName() local entitiesInBox = ents.FindInBox(activatorOrigin+vectorMin, activatorOrigin+vectorMax) BustDamage = { Attacker = player, Inflictor = nil, Weapon = activeWeapon, Damage = 1500, DamageType = DMG_BLAST, CritType = 0, DamagePosition = activatorOrigin, ReportedPosition = activatorOrigin } for _, entityWeFound in pairs(entitiesInBox) do if entityWeFound:IsBot() == true or entityWeFound.m_iClassname == "obj_sentrygun" then --print(entityWeFound) entityWeFound:TakeDamage(BustDamage) goto FindNextEntity end ::FindNextEntity:: end player:Suicide() util.ParticleEffect("hightower_explosion", activatorOrigin, vectorParticle, player) end end) end