Universal Script 📌
346 Views
27 Executions

Damage stack Indicator

Universal Script 📌
Zale
ZalePublished 5
8 months ago
Get an executor
Please login to perform these actions:

Does it work?

No reports yet

No reports yet. Tried it? Be the first to say.

Also noticed:

Description

View Raw
-- 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

0
Log in to join the conversation. Login
No comments yet. Be the first!

More universal scripts

See all
Universal Script 📌
28.3k
663.4k
Bumped 34 minutes ago
Script hub
13.5k
2.7k
Bumped 3 hours ago
Key System
Paid
Script hub
263.1k
88.1k
Bumped 4 hours ago
Key System
Universal Script 📌
2.4k
9.4k
Bumped 4 hours ago
Universal Script 📌
220
29
Approved 4 hours ago
Universal Script 📌
246
26
Approved 4 hours ago
Universal Script 📌
269
9
Approved 4 hours ago