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

Gui Currency Numbers Help?

Hello, I Really Need Help In This script And I Don't Know How The script Is About A Gui And I Really Want It To Say 1k Instead Of 1000 Like That After That It Will be 1000000 To 1M...

while wait(0) do
	script.Parent.Text = "Coins : "..game.Players.LocalPlayer.leaderstats.Coins.Value
end

1 answer

Try this:

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 = "Coins: " .. shortAmt
	else
		script.Parent.Text = "Coins : "..game.Players.LocalPlayer.leaderstats.Coins.Value
	end
end

If it's greater than 1 million then do this:

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

3 comments

0

How Do I add Multiple

0

I edited my answer to show you how to do 1 mil. If this helped please accept the answer! Thanks!

0

If you wanted to combine them both than you would have to use an "else if"

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