Advertisement
Honansik

Pet Simulator X Script [Show Pet Hidden Chances]

Dec 21st, 2021
3,419
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.83 KB | None | 0 0
  1. workspace.__MAP.Eggs.DescendantAdded:Connect(function(a)
  2.    if a.Name == 'EggInfo' then
  3.        for i,v in pairs(a.Frame.Pets:GetChildren()) do
  4.            if v:IsA('Frame') and v.Thumbnail.Chance.Text == '??' then
  5.                local pet
  6.                for _,tbl in pairs(getgc(true)) do
  7.                    if (typeof(tbl) == 'table' and rawget(tbl, 'thumbnail')) then
  8.                        if tbl.thumbnail == v.Thumbnail.Image then
  9.                            pet = string.split(tostring(tbl.model.Parent), ' - ')[1]
  10.                        end
  11.                    end
  12.                end
  13.                for _,egg in pairs(game.ReplicatedStorage.Game.Eggs:GetDescendants()) do
  14.                    if egg:IsA('ModuleScript') and typeof(require(egg).drops) == 'table' then
  15.                        for _,drop in pairs(require(egg).drops) do
  16.                            if pet == '266' then v.Thumbnail.Chance.Text = '0.000002%' return end
  17.                            if drop[1] == pet then
  18.                                v.Thumbnail.Chance.Text = drop[2] .. '%'
  19.                            end
  20.                        end
  21.                    end
  22.                end
  23.            end
  24.        end
  25.    end
  26. end)
  27.  
  28. local lib = require(game.ReplicatedStorage.Framework.Library)
  29. table.foreach(lib.Save.Get(), print)
  30.  
  31. local oldworld = lib.Save.Get().World
  32. while wait(0.1) do
  33.    if lib.Save.Get().World ~= oldworld then
  34.        oldworld = lib.Save.Get().World
  35.        workspace.__MAP.Eggs.DescendantAdded:Connect(function(a)
  36.            if a.Name == 'EggInfo' then
  37.                for i,v in pairs(a.Frame.Pets:GetChildren()) do
  38.                    if v:IsA('Frame') and v.Thumbnail.Chance.Text == '??' then
  39.                        local pet
  40.                        for _,tbl in pairs(getgc(true)) do
  41.                            if (typeof(tbl) == 'table' and rawget(tbl, 'thumbnail')) then
  42.                                if tbl.thumbnail == v.Thumbnail.Image then
  43.                                    pet = string.split(tostring(tbl.model.Parent), ' - ')[1]
  44.                                end
  45.                            end
  46.                        end
  47.                        for _,egg in pairs(game.ReplicatedStorage.Game.Eggs:GetDescendants()) do
  48.                            if egg:IsA('ModuleScript') and typeof(require(egg).drops) == 'table' then
  49.                                for _,drop in pairs(require(egg).drops) do
  50.                                    if pet == '266' then v.Thumbnail.Chance.Text = '0.000002%' return end
  51.                                    if drop[1] == pet then
  52.                                        v.Thumbnail.Chance.Text = drop[2] .. '%'
  53.                                    end
  54.                                end
  55.                            end
  56.                        end
  57.                    end
  58.                end
  59.            end
  60.        end)
  61.    end
  62. end
Advertisement
Comments
Add Comment
Please, Sign In to add comment
Advertisement