This script works for the cur1, but it doesn't work for the other currencies.
game.Players.PlayerAdded:Connect(function(player)
local folder = Instance.new("Folder")
folder.Name = "XD"
folder.Parent = player
local cur1 = Instance.new("IntValue")
cur1.Name = "Coins"
cur1.Value = 5000
cur1.Parent = folder
local cur2 = Instance.new("IntValue")
cur2.Name = "Gems"
cur2.Value = 5000
cur2.Parent = folder
local cur3 = Instance.new("IntValue")
cur3.Name = "things"
cur3.Value = 5000
cur3.Parent = folder
local cur4 = Instance.new("IntValue")
cur4.Name = "Total"
cur4.Value = 5000
cur4.Parent = folder
local leaderstats = Instance.new("Folder")
leaderstats.Name = "leaderstats"
leaderstats.Parent = player
local fake1 = Instance.new("StringValue")
fake1.Name = cur1.Name
fake1.Value = tostring(cur1.Value)
fake1.Parent = leaderstats
local fake2 = Instance.new("StringValue")
fake2.Name = cur2.Name
fake2.Value = tostring(cur2.Value)
fake2.Parent = leaderstats
local fake3 = Instance.new("StringValue")
fake3.Name = cur3.Name
fake3.Value = tostring(cur3.Value)
fake3.Parent = leaderstats
local fake4 = Instance.new("StringValue")
fake4.Name = cur4.Name
fake4.Value = tostring(cur4.Value)
fake4.Parent = leaderstats
while wait() do
local x = tostring(cur1.Value)
if #x >= 10 then
fake1.Value = x:sub(0,(#x-9)).."."..(x:sub(#x-7,(#x-7))).."B+"
elseif #x >= 7 then
fake1.Value = x:sub(0,(#x-6)).."."..(x:sub(#x-5,(#x-5))).."M+"
elseif #x >= 4 then
fake1.Value = x:sub(0,(#x-3)).."."..(x:sub(#x-2,(#x-2))).."K+"
else
fake1.Value = tostring(cur1.Value)
while wait() do
local x = tostring(cur2.Value)
if #x >= 10 then
fake2.Value = x:sub(0,(#x-9)).."."..(x:sub(#x-7,(#x-7))).."B+"
elseif #x >= 7 then
fake2.Value = x:sub(0,(#x-6)).."."..(x:sub(#x-5,(#x-5))).."M+"
elseif #x >= 4 then
fake2.Value = x:sub(0,(#x-3)).."."..(x:sub(#x-2,(#x-2))).."K+"
else
fake2.Value = tostring(cur2.Value)
while wait() do
local x = tostring(cur3.Value)
if #x >= 10 then
fake3.Value = x:sub(0,(#x-9)).."."..(x:sub(#x-7,(#x-7))).."B+"
elseif #x >= 7 then
fake3.Value = x:sub(0,(#x-6)).."."..(x:sub(#x-5,(#x-5))).."M+"
elseif #x >= 4 then
fake3.Value = x:sub(0,(#x-3)).."."..(x:sub(#x-2,(#x-2))).."K+"
else
fake3.Value = tostring(cur3.Value)
while wait() do
local x = tostring(cur4.Value)
if #x >= 10 then
fake4.Value = x:sub(0,(#x-9)).."."..(x:sub(#x-7,(#x-7))).."B+"
elseif #x >= 7 then
fake4.Value = x:sub(0,(#x-6)).."."..(x:sub(#x-5,(#x-5))).."M+"
elseif #x >= 4 then
fake4.Value = x:sub(0,(#x-3)).."."..(x:sub(#x-2,(#x-2))).."K+"
else
fake4.Value = tostring(cur4.Value)
end
end
end
end
end
end
end
end
end)

6 comments
Can you explain your question better? I'm not going to look through 117 lines of code for errors, when I don't even know exactly what the problem is.
oh, this displays 5.1k instead of 5100 and the coins is working but the gems arent.
your while loops are so messy
sorry i didn't finish my code but i've editted it. you can read it now
1/3 of the questions on this website are literally this same question
This code made me throw up in my mouth.