Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to make a money indicator similar to a damage indicator?

Asked by 4 years ago
Edited 4 years ago

I'm trying to make a money indicator that looks like a damage indicator. That appears when the player makes money somewhere in his body. I didn't know where to start so I tried to get a damage indicator script and motivate it but it didn't work.

I've already made a leaderboard

`local bill = Instance.new("BillboardGui") bill.Parent = script.Parent bill.Active = false bill.Adornee = script.Parent.Head bill.AlwaysOnTop = false bill.Enabled = true bill.Size = UDim2.new(1, 0, 1, 0) bill.StudsOffset = Vector3.new(-0.5, 5, 0) local stats = Instance("BoolValue") stats = "leaderstats"

    local cash = Instance("IntValue", stats)
    cash = "Dinheiro"
    script.Parent.Humanoid.stats:connect(function(NewStats)
        local statsChange = math.abs(stats - NewStats)
        sym = (stats > NewStats and "-" or "+")
        if sym == "+" then
            if statsChange >= 5 then
                text = Instance.new("TextLabel", bill)
                text.BackgroundTransparency = 1
                text.Name = "Obtainstats"
                text.Size = UDim2.new(2, 0, 2, 0)
                text.Font = "SourceSansBold"
                text.FontSize = "Size48"
                text.Text = "+" .. math.floor(statsChange)
                text.TextColor3 = Color3.new(85 / 255, 1, 0)
                text.TextScaled = true
                text.TextStrokeColor3 = Color3.new(50 / 255, 150 / 255, 73 / 255)
                text.TextStrokeTransparency = 0
                text.TextWrapped = true
                scr = script.Dissapear:clone()
                scr.Parent = text
                scr.Disabled = false
            end
        else
            text = Instance.new("TextLabel", bill)
            text.BackgroundTransparency = 1
            text.Name = "Gainstats"
            text.Size = UDim2.new(2, 0, 2, 0)
            text.Font = "SourceSansBold"
            text.FontSize = "Size48"
            text.Text = "-" .. math.floor(statsChange)
            text.TextColor3 = Color3.new(1, 0, 0)
            text.TextScaled = true
            text.TextStrokeColor3 = Color3.new(115 / 255, 0, 0)
            text.TextStrokeTransparency = 0
            text.TextWrapped = true
            scr = script.Dissapear:clone()
            scr.Parent = text
            scr.Disabled = false
        end
        stats = NewStats
    end)

the motivated damage script

text = script.Parent for i = 1, 25 do wait(0.01) text.Position = text.Position - UDim2.new(0, 0, 0.04, 0) text.TextTransparency = text.TextTransparency + 0.04 text.TextStrokeTransparency = text.TextStrokeTransparency + 0.04 end text:remove()

Dissapear Script is in the Damage script with the billboardGui. The Damage Script is in the StarterCharacterScripts

Answer this question