-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rebirth2.lua
30 lines (26 loc) · 1.03 KB
/
Rebirth2.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
repeat wait() until game:IsLoaded()
while true do
if pcall(function() game.Players.LocalPlayer.leaderstats:WaitForChild("Blocks Mined") end) then
if pcall(function() game.Players.LocalPlayer.PlayerGui.ScreenGui.StatsFrame.Coins:FindFirstChild("Amount") end) then
if game.Players.LocalPlayer.PlayerGui.ScreenGui.StatsFrame.Tokens.Amount.Text ~= "Loading..." then
break
end
end
end
wait(1)
end
local function comma_value(amount)
local formatted = amount
while true do
formatted, k = string.gsub(formatted, "^(-?%d+)(%d%d%d)", '%1,%2')
if (k==0) then
break
end
end
return formatted
end
local Rebirths = game.Players.LocalPlayer.leaderstats.Rebirths
local lb = game:GetService("CoreGui").PlayerList.PlayerListMaster.OffsetFrame.PlayerScrollList.SizeOffsetFrame.ScrollingFrameContainer.ScrollingFrameClippingFrame.ScollingFrame.OffsetUndoFrame["p_"..tostring(game.Players.LocalPlayer.UserId)].ChildrenFrame["GameStat_Rebirths"].OverlayFrame.StatText
lb.Changed:Connect(function()
lb.Text = comma_value(Rebirths.Value)
end)