Very oofed im trying to make a gui that shows your cash but i cant seem to do it. my script:
local suffixes = {'','K+','M+','B+','T+','Qd+','Qn+','S+','Sp+','O+','N+','D+'}
local function format(val)
for i=1, #suffixes do
if tonumber(val) < 10^(i*3) then
return math.floor(val/((10^((i-1)*3))/100))/(100)..suffixes[i]
end
end
end
local player = game.Players.LocalPlayer or game.Players.PlayerAdded:Wait()
local leaderboard = player:WaitForChild("leaderstats")
local Stats = leaderboard.Coins
local value = script.Parent
script.Parent.Text = format(Stats.Value)script.Parent.Parent.Parent.ValName.Text = "Cash"
Stats:GetPropertyChangedSignal("Value"):Connect(function()
script.Parent.Text = format(Stats.Value)
end)
i suspect its the suffixes that is bugged

4 comments
If you have any problems comment back and i'll get back to you when I can. If it works and it's what you wanted then if you can click is as the correct answer that'd be great. Cya
You don't have to set the Parent twice. You can either do ("IntValue", leaderstats) or cash.Parent = leaderstats. Settings it two times doesn't make any sense
Just sayin
^ The parental argument of the Instance constructor was deprecated, it is recommended you just set the parent manually, and after all property modifications.