
346 Views
27 Executions
Damage stack Indicator
Universal Script 📌
ZalePublished 5
8 months ago
Please login to perform these actions:Does it work?
No reports yetNo reports yet. Tried it? Be the first to say.
Also noticed:
Description
-- Settings
local DAMAGE_COLOR = Color3.fromRGB(255, 75, 75)
local DEATH_COLOR = Color3.fromRGB(255, 0, 0)
local HEAVY_HIT_THRESHOLD = 50
local STACK_RESET_TIME = 5.0 -- Damage memory lasts 5s
local DISPLAY_TIME = 1.3 -- Animation lasts 1.3s
local BASE_SHAKE = 0.12
local BASE_SIZE = 2.2
local DamagePools = {} -- Persistent damage totals
local ActiveVisuals = {} -- Current active Billboard per humanoid
local function formatDamage(amount)
local absAmount = math.abs(amount)
return (absAmount % 1 == 0) and tostring(math.floor(absAmount)) or string.format("%.1f", absAmount)
end
local function createIndicator(humanoid, amount, isDeath)
local root = humanoid.Parent:FindFirstChild("HumanoidRootPart") or humanoid.Parent:FindFirstChild("Head")
if not root then return end
-- 1. Handle the Persistent Damage Pool (5s Memory)
if not DamagePools[humanoid] then
DamagePools[humanoid] = {Total = 0, LastHit = 0}
end
local pool = DamagePools[humanoid]
-- If it's been more than 5s, start the stack over
if tick() - pool.LastHit > STACK_RESET_TIME then
pool.Total = math.abs(amount)
else
pool.Total = pool.Total + math.abs(amount)
end
pool.LastHit = tick()
local displayAmount = pool.Total
-- 2. Handle the Instant Visual Update
-- If a number is already floating, destroy it so we can "restart" the animation
Comments
0Log in to join the conversation. Login
No comments yet. Be the first!







