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

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

Asked by 4 years ago
Edited 4 years ago

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
0
you have to use some logic ;) Newh0hrizonCz 58 — 4y

1 answer

Log in to vote
0
Answered by
VAHMPIN 277 Moderation Voter
4 years ago
Edited 4 years ago

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)

0
it will also update since it's on a loop. VAHMPIN 277 — 4y
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 rjthecoolkid1215 4 — 4y
0
look again, i think that's what you want, right? VAHMPIN 277 — 4y
0
No I Want The Script Like Mine rjthecoolkid1215 4 — 4y
View all comments (2 more)
0
specific values? VAHMPIN 277 — 4y
0
Mine Is Like When I Get 13.8K Coins It says "13.8K" But Yours Said "100K+" Only rjthecoolkid1215 4 — 4y
Ad

Answer this question