Advertisement
Gerard_games

pet sim x tracker

Aug 15th, 2021 (edited)
626,549
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.67 KB | None | 0 0
  1. --[[ Very well aware... ugly :)]]
  2. local gamelibrary = require(game:GetService("ReplicatedStorage").Framework.Library)
  3. local Save = gamelibrary.Save.Get
  4. local Commas = gamelibrary.Functions.Commas
  5. local types = {}
  6. local menus = game:GetService("Players").LocalPlayer.PlayerGui.Main.Right
  7. for i, v in pairs(menus:GetChildren()) do
  8.     if v.ClassName == 'Frame' and v.Name ~= 'Rank' and not string.find(v.Name, "2") then
  9.         table.insert(types, v.Name)
  10.     end
  11. end
  12. function get(thistype)
  13.     if game.PlaceId == 10321372166 and string.find(string.lower(thistype), "coins") then
  14.         return Save().HardcoreCurrency[thistype]
  15.     else
  16.         return Save()[thistype]
  17.     end
  18. end
  19.            
  20. local LayoutOrders = {
  21.     ["Diamonds"] = 999910;
  22.     ["Halloween Candy"] = 999920;
  23.     ["Gingerbread"] = 999930;
  24.     ["Rainbow Coins"] = 999940;
  25.     ["Tech Coins"] = 999950;
  26.     ["Fantasy Coins"] = 999960;
  27.     ["Coins"] = 999970;
  28. }
  29. menus.UIListLayout.HorizontalAlignment = 2
  30. _G.MyTypes = {}
  31. for i,v in pairs(types) do
  32.     if menus:FindFirstChild(v.."2") then
  33.         menus:FindFirstChild(v.."2"):Destroy()
  34.     end
  35. end
  36. for i,v in pairs(types) do
  37.     spawn(function()
  38.         if not menus:FindFirstChild(v.."2") then
  39.             menus:WaitForChild(v).LayoutOrder = LayoutOrders[v]
  40.             local tempmaker = menus:WaitForChild(v):Clone()
  41.             tempmaker.Name = tostring(tempmaker.Name .. "2")
  42.             tempmaker.Parent = menus
  43.             tempmaker.Size = UDim2.new(0, 175, 0, 30)
  44.             tempmaker.LayoutOrder = tempmaker.LayoutOrder + 1
  45.             _G.MyTypes[v] = tempmaker
  46.         end
  47.     end)
  48. end
  49. spawn(function() menus:WaitForChild("Diamonds2").Add.Visible = false end)
  50. -- Skidded from byte-chan:tm:
  51. for i,v in pairs(types) do
  52.     spawn(function()
  53.         repeat task.wait() until _G.MyTypes[v]
  54.         local megatable = {}
  55.         local imaginaryi = 1
  56.         local ptime = 0
  57.         local last = tick()
  58.         local now = last
  59.         local TICK_TIME = 0.5
  60.         while true do
  61.             if ptime >= TICK_TIME then
  62.                 while ptime >= TICK_TIME do ptime = ptime - TICK_TIME end
  63.                 local currentbal = get(v)
  64.                 megatable[imaginaryi] = currentbal
  65.                 local diffy = currentbal - (megatable[imaginaryi-120] or megatable[1])
  66.                 imaginaryi = imaginaryi + 1
  67.                 _G.MyTypes[v].Amount.Text = tostring(Commas(diffy).." in 60s")
  68.                 _G.MyTypes[v].Amount_odometerGUIFX.Text = tostring(Commas(diffy).." in 60s")
  69.             end
  70.             task.wait()
  71.             now = tick()
  72.             ptime = ptime + (now - last)
  73.             last = now
  74.         end
  75.     end)
  76. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement