Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How Do I Make The Gui Coins 1M When My Leaderstats Is 1000000???

Hello, Can Anyone Make A Gui Coins 1M When My Leaderstats Is 1000000??? I Already Have The Script But I Dont Know How To Continue It So Can Anyone Help me?? Here Is Script :

while wait(0.1) do
    if game.Players.LocalPlayer.leaderstats.Coins.Value > 1000 then
        local shortAmt = tostring(game.Players.LocalPlayer.leaderstats.Coins.Value / 1000) .. "K"
        script.Parent.Text = "        " .. shortAmt
	else
        script.Parent.Text = "        "..game.Players.LocalPlayer.leaderstats.Coins.Value
    end
end

For Example :

while wait(0.1) do
    if game.Players.LocalPlayer.leaderstats.Coins.Value > 1000 then
        local shortAmt = tostring(game.Players.LocalPlayer.leaderstats.Coins.Value / 1000) .. "K"
        script.Parent.Text = "        " .. shortAmt
	else
	local shortAmt = tostring(game.Players.LocalPlayer.leaderstats.Coins.Value / 1000000) .. "M"
        script.Parent.Text = "        "..game.Players.LocalPlayer.leaderstats.Coins.Value
    end
end

1 comment

0

you have to use some logic ;)

1 answer

✓ Accepted answer

This should work

  • put in a local script and then local script inside text label
game:GetService("RunService").Stepped:Connect(function()
           game:GetService("RunService").Stepped:Wait()

if game.Players.LocalPlayer.leaderstats.Coins.Value >= 1000000 then
            script.Parent.Text = "1M+"
else
if game.Players.LocalPlayer.leaderstats.Coins.Value >= 1000 then
  script.Parent.Text = "1K+"
else
if game.Players.LocalPlayer.leaderstats.Coins.Value >= 10000 then
  script.Parent.Text = "10K+"
else
if game.Players.LocalPlayer.leaderstats.Coins.Value >= 100000 then
  script.Parent.Text = "100K+"
else
if game.Players.LocalPlayer.leaderstats.Coins.Value >= 5000000 then
  script.Parent.Text = "5M+"
else
if game.Players.LocalPlayer.leaderstats.Coins.Value >= 10000000 then
  script.Parent.Text = "10M+"
else
 script.Parent.Text = game.Players.LocalPlayer.leaderstats.Coins.Value
                    end
                end
            end
        end
     end
   end
end)
  • try this
game:GetService("RunService").Stepped:Connect(function()
           game:GetService("RunService").Stepped:Wait()
if game.Players.LocalPlayer.leaderstats.Coins.Value >=1000 then
  script.Parent.Text = game.Players.LocalPlayer.leaderstats.Coins.Value:Sub(1,-3).."K"
else
if game.Players.LocalPlayer.leaderstats.Coins.Value >= 1000000 then
              script.Parent.Text = game.Players.LocalPlayer.leaderstats.Coins.Value:Sub(1,-6).."M"
       end
    end
end)

6 comments

0

it will also update since it's on a loop.

0

I Mean The Script I Put On Top Like That After "else" It Should Be "tostring(game.Players.LocalPlayer.leaderstats.Coins.Value / 1000000) .. "M" 4 script.Parent.Text = " " .. shortAmt" Again

0

look again, i think that's what you want, right?

0

No I Want The Script Like Mine

0

specific values?

0

Mine Is Like When I Get 13.8K Coins It says "13.8K" But Yours Said "100K+" Only

This discussion is preserved as it was. New answers, comments, and votes are closed.