#I'm so lost on this one stupid line
1 messages · Page 1 of 1 (latest)
share the code please
local Abbreviations = {
"";
"K";
"M";
"B";
"T";
"Qa";
"Qi";
"Sx";
"Sp";
"Oc";
"No";
"Dc";
"Ud";
"Dd";
"Td";
"Qad";
"Qid";
"Sxd";
"Spd";
"Ocd";
"Nod";
"Vg";
}
function Abbreviation(Number)
if Number < 10^66 then
for i = 1, #Abbreviations do
if Number < 10 ^ (i * 3) then
if Abbreviations[i] == "inf" then
return "∞"
else
return math.floor(Number / ((10 ^ ((i - 1) * 3)) / 100)) / 100 ..Abbreviations[i]
end
elseif tostring(Number) == "inf" then
return "∞"
end
end
else
local FirstThree = string.sub(tostring(Number), 0, 4)
local lengthuntile = string.find(string.reverse(tostring(Number)), "+")
local endthree = string.reverse(string.sub(string.reverse(tostring(Number)), 0, lengthuntile - 1))
local result = tostring(FirstThree.."e"..endthree)
return result
end
end
player = game.Players.LocalPlayer
player.Backpack.Folder.Money.Changed:Connect(function()
player.PlayerGui.Fake.Frame.Money.TextLabel.Text = `{Abbreviation(player.Backpack.Folder.Money.Value)}`
end) ```
here
its a local script in starter player scripts
and the folder is assigned to the player's backback?
yep 😭
its just the regular "folder"
it is Folder i forgot caps because im stupid
oh sorry
its worked on every other script so yes
ok let me test it
...
and its wait for child?
waitforchild or not it doesn't work
i tried it both ways
is there another script related to this?
the only real relations are scripts changing the Money's Value
show the other scripts that do stuff like this maybe ill check the difference
player = game:GetService("Players").PlayerAdded:Wait()
-- game tick every 1 sec
while task.wait(GT) do
if player.Backpack.Folder["money1(Fake)"].Value == true then
if player.Backpack.Folder["money2(Fake)"].Value == true then
player.Backpack.Folder["Money"].Value = player.Backpack.Folder["Money"].Value + 5
else
player.Backpack.Folder["Money"].Value = player.Backpack.Folder["Money"].Value + 1
end
end
end ```
server script
ok so since you got infinite yield try making it check every 5 seconds for it just for testing purposes
player.Backpack.Folder.Money.Changed:Connect(function()
player.PlayerGui.Fake.Frame.Money.TextLabel.Text = `{Abbreviation(player.Backpack.Folder.Money.Value)}`
end)
end``` like this?
ye its cuz clients dont load everything right away
ofc (: