
390 Views
256 Executions
Damage 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 DISPLAY_TIME = 1.3
local BASE_SHAKE = 0.12
local BASE_SIZE = 2.2
local function formatDamage(amount)
local absAmount = math.abs(amount)
-- If the number is round (e.g. 20.0), show as "20"
-- If it has a decimal (e.g. 20.1), show as "20.1"
if absAmount % 1 == 0 then
return tostring(math.floor(absAmount))
else
return string.format("%.1f", absAmount)
end
end
local function createIndicator(targetPart, amount, isDeath)
local billboard = Instance.new("BillboardGui")
billboard.Size = UDim2.new(BASE_SIZE, 0, BASE_SIZE, 0)
billboard.Adornee = targetPart
billboard.AlwaysOnTop = true
billboard.ExtentsOffset = Vector3.new(0, 3, 0)
local label = Instance.new("TextLabel")
label.Size = UDim2.new(1, 0, 1, 0)
label.BackgroundTransparency = 1
label.TextScaled = true
label.Font = Enum.Font.Cartoon
label.TextStrokeColor3 = Color3.fromRGB(0, 0, 0)
label.TextStrokeTransparency = 0
label.Rotation = math.random(-15, 15)
local isHeavy = math.abs(amount) >= HEAVY_HIT_THRESHOLD
if isDeath then
label.Text = "DEATH"
label.TextColor3 = DEATH_COLOR
Comments
0Log in to join the conversation. Login
No comments yet. Be the first!







