Advertisement
Gerard_games

Pet Sim GUI

Sep 18th, 2021 (edited)
315,435
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 15.46 KB | None | 0 0
  1. loadstring(game:HttpGet("https://rawscripts.net/raw/CATS-or-Pet-Simulator-X!-Pasta-v2-6841"))()
  2.  
  3.  
  4. --[[
  5. local library = loadstring(game:HttpGet('https://pastebin.com/raw/T3tvmaz4'))()
  6. local MainWindow = library:CreateWindow("Farming")
  7. local EggsWindow = library:CreateWindow("Eggs")
  8.  
  9. local GameLibrary = require(game:GetService("ReplicatedStorage"):WaitForChild("Framework"):WaitForChild("Library"))
  10. local Network = GameLibrary.Network
  11. local Run_Service = game:GetService("RunService")
  12. local rs = Run_Service.RenderStepped
  13. local CurrencyOrder = {"Rainbow Coins", "Tech Coins", "Fantasy Coins", "Coins", "Diamonds"}
  14.  
  15. local IMightKillMyselfCauseOfThis = {
  16.             --Misc
  17.             ['VIP'] = {'VIP'};
  18.             --Spawn
  19.             ['Town'] = {'Town', 'Town FRONT'}; ['Forest'] = {'Forest', 'Forest FRONT'}; ['Beach'] = {'Beach', 'Beach FRONT'}; ['Mine'] = {'Mine', 'Mine FRONT'}; ['Winter'] = {'Winter', 'Winter FRONT'}; ['Glacier'] = {'Glacier', 'Glacier Lake'}; ['Desert'] = {'Desert', 'Desert FRONT'}; ['Volcano'] = {'Volcano', 'Volcano FRONT'};
  20.             -- Fantasy init
  21.             ['Enchanted Forest'] = {'Enchanted Forest', 'Enchanted Forest FRONT'}; ['Ancient'] = {'Ancient Island'}; ['Samurai'] = {'Samurai Island', 'Samurai Island FRONT'}; ['Candy'] = {'Candy Island'}; ['Haunted'] = {'Haunted Island', 'Haunted Island FRONT'}; ['Hell'] = {'Hell Island'}; ['Heaven'] = {'Heaven Island'};
  22.             -- Tech
  23.             ['Ice Tech'] = {'Ice Tech'}; ['Tech City'] = {'Tech City'; 'Tech City FRONT'}; ['Dark Tech'] = {'Dark Tech'; 'Dark Tech FRONT'}; ['Steampunk'] = {'Steampunk'; 'Steampunk FRONT'}, ['Alien Forest'] = {"Alien Forest"; "Alien Forest FRONT"}, ['Alien Lab'] = {"Alien Lab"; "Alien Lab FRONT"}, ['Glitch'] = {"Glitch"; "Glitch FRONT"}; ['Hacker Portal'] = {"Hacker Portal", "Hacker Portal FRONT"};
  24.             -- Axolotl
  25.             ['Axolotl Ocean'] = {'Axolotl Ocean', 'Axolotl Ocean FRONT'}; ['Axolotl Deep Ocean'] = {'Axolotl Deep Ocean', 'Axolotl Deep Ocean FRONT'}; ['Axolotl Cave'] = {'Axolotl Cave', 'Axolotl Cave FRONT'};
  26.             -- Minecraft
  27.             ['Pixel Forest'] = {'Pixel Forest', 'Pixel Forest FRONT'}; ['Pixel Kyoto'] = {'Pixel Kyoto', 'Pixel Kyoto FRONT'}; ['Pixel Alps'] = {'Pixel Alps', 'Pixel Alps FRONT'} ; ['Pixel Vault'] = {'Pixel Vault', 'Pixel Vault FRONT'};
  28.         }
  29.  
  30.         local AreaList = { --These match the IMightKillMyselfCuaseOfThis table
  31.             'VIP';
  32.             'Town'; 'Forest'; 'Beach'; 'Mine'; 'Winter'; 'Glacier'; 'Desert'; 'Volcano';
  33.             'Enchanted Forest'; 'Ancient'; 'Samurai'; 'Candy'; 'Haunted'; 'Hell'; 'Heaven';
  34.             'Ice Tech'; 'Tech City'; 'Dark Tech'; 'Steampunk'; 'Alien Lab'; 'Alien Forest'; 'Glitch'; "Hacker Portal";
  35.             'Axolotl Ocean'; 'Axolotl Deep Ocean'; 'Axolotl Cave';
  36.             'Pixel Forest'; 'Pixel Kyoto'; 'Pixel Alps'; 'Pixel Vault';
  37.         }
  38.  
  39.         local Chests = {
  40.             -- Spawn
  41.             "Magma Chest",
  42.             -- Fantasy
  43.             "Enchanted Chest", "Hell Chest", "Haunted Chest", "Angel Chest", "Grand Heaven Chest",
  44.             -- Tech
  45.             "Giant Tech Chest"; "Giant Steampunk Chest"; "Giant Alien Chest"; "Giant Hacker Chest";
  46.             -- exolot
  47.            "Giant Ocean Chest";
  48.            -- Minecraft
  49.            "Giant Pixel Chest";
  50.         }
  51.  
  52.  
  53. workspace.__THINGS.__REMOTES.MAIN:FireServer("b", "buy egg")
  54. workspace.__THINGS.__REMOTES.MAIN:FireServer("b", "join coin")
  55. workspace.__THINGS.__REMOTES.MAIN:FireServer("a", "farm coin")
  56. workspace.__THINGS.__REMOTES.MAIN:FireServer("a", "claim orbs")
  57. workspace.__THINGS.__REMOTES.MAIN:FireServer("a", "change pet target")
  58.  
  59. --Farms a coin. It seems to work. That's fun
  60. function FarmCoin(CoinID, PetID)
  61.     game.workspace['__THINGS']['__REMOTES']["join coin"]:InvokeServer({[1] = CoinID, [2] = {[1] = PetID}})
  62.     game.workspace['__THINGS']['__REMOTES']["farm coin"]:FireServer({[1] = CoinID, [2] = PetID})
  63. end
  64.  
  65. function GetMyPets()
  66.    local returntable = {}
  67.    for i,v in pairs(GameLibrary.Save.Get().Pets) do
  68.        if v.e then
  69.            table.insert(returntable, v.uid)
  70.        end
  71.    end
  72.    return returntable
  73. end
  74.  
  75. --returns all coins within the given area (area must be a table of conent)
  76. function GetCoins(area)
  77.     local returntable = {}
  78.     local ListCoins = game.workspace['__THINGS']['__REMOTES']["get coins"]:InvokeServer({})[1]
  79.     for i,v in pairs(ListCoins) do
  80.         if MainWindow.flags.FarmingArea == 'All' or table.find(IMightKillMyselfCauseOfThis[MainWindow.flags.FarmingArea], v.a) then
  81.             local shit = v
  82.             shit["index"] = i
  83.             table.insert(returntable, shit)
  84.          end
  85.     end
  86.     return returntable
  87. end
  88.  
  89. --Sexy man ( wYn#0001 ) made this for me. It works, not sure how, it does.
  90. function GetCoinTable(area)
  91.     local CoinTable = GetCoins(area)
  92.     function getKeysSortedByValue(tbl, sortFunction)
  93.         local keys = {}
  94.         for key in pairs(tbl) do
  95.             table.insert(keys, key)
  96.         end
  97.         table.sort(
  98.             keys,
  99.             function(a, b)
  100.                 return sortFunction(tbl[a].h, tbl[b].h)
  101.             end
  102.         )
  103.         return keys
  104.     end
  105.     local sortedKeys = getKeysSortedByValue(CoinTable, function(a, b) return a > b end)
  106.     local newCoinTable = {}
  107.  
  108.     for i,v in pairs(sortedKeys) do
  109.         table.insert(newCoinTable, CoinTable[v])
  110.     end
  111.    
  112.     return newCoinTable
  113. end
  114.  
  115. --Not sure exactly why I did this
  116. local AreaWorldTable = {}
  117. for _, v in pairs(game:GetService("ReplicatedStorage").Game.Coins:GetChildren()) do
  118.     for _, b in pairs(v:GetChildren()) do
  119.         table.insert(AreaWorldTable, b.Name)
  120.     end
  121.     table.insert(AreaWorldTable, v.Name)
  122. end
  123.  
  124. --Returns all the currently alive chests in the game  the same was getcoins does
  125. function AllChests()
  126.     local returntable = {}
  127.     local ListCoins = game.workspace['__THINGS']['__REMOTES']["get coins"]:InvokeServer({})[1]
  128.     for i,v in pairs(ListCoins) do
  129.         local shit = v
  130.         shit.index = i
  131.         for aa,bb in pairs(AreaWorldTable) do
  132.             if string.find(v.n, bb) or  string.find(v.n, "Giant") then
  133.                 local thing = string.gsub(v.n, bb.." ", "")
  134.                 if table.find(Chests, thing) then
  135.                     shit.n = thing
  136.                     table.insert(returntable, shit)
  137.                 end
  138.             end
  139.         end
  140.     end
  141.     return returntable
  142. end
  143.  
  144. --[[
  145. --the remote works like this. I'm too scared to test anything else out
  146. function CollectOrbs()
  147.     local ohTable1 = {[1] = {}}
  148.     for i,v in pairs(game.workspace['__THINGS'].Orbs:GetChildren()) do
  149.         ohTable1[1][i] = v.Name
  150.     end
  151.     game.workspace['__THINGS']['__REMOTES']["claim orbs"]:FireServer(ohTable1)
  152. end
  153. ]]
  154.  
  155. if _G.MyConnection then _G.MyConnection:Disconnect() end
  156. _G.MyConnection = game.Workspace.__THINGS.Orbs.ChildAdded:Connect(function(Orb)
  157.     game.Workspace.__THINGS.__REMOTES["claim orbs"]:FireServer({{Orb.Name}})
  158. end)
  159.  
  160. MainWindow:Toggle("Enabled", {flag = 'FarmingEnabled'}, function(new)
  161.     local CurrentFarmingPets = {}
  162.     while task.wait() and MainWindow.flags.FarmingEnabled do
  163.         local pethingy = GetMyPets()
  164.        
  165.         if MainWindow.flags.FarmingType == 'Normal' then
  166.             local cointhiny = GetCoins(MainWindow.flags.FarmingArea)
  167.             for i = 1, #cointhiny do
  168.                 if MainWindow.flags.FarmingEnabled and game:GetService("Workspace")["__THINGS"].Coins:FindFirstChild(cointhiny[i].index) then
  169.                     for _, bb in pairs(pethingy) do
  170.                         if MainWindow.flags.FarmingEnabled and game:GetService("Workspace")["__THINGS"].Coins:FindFirstChild(cointhiny[i].index) then
  171.                                 wait(0.1)
  172.                             spawn(function()
  173.                                 FarmCoin(cointhiny[i].index, bb)
  174.                             end)
  175.                         end
  176.                     end
  177.                     repeat task.wait() until not game:GetService("Workspace")["__THINGS"].Coins:FindFirstChild(cointhiny[i].index)
  178.                 end
  179.             end
  180.  
  181.         elseif MainWindow.flags.FarmingType == 'Chest' then
  182.             for i,v in pairs(AllChests()) do
  183.                 if (v.n == MainWindow.flags.FarmingSingleChest) or (MainWindow.flags.FarmingSingleChest == 'All') then
  184.                     local starttick = tick()
  185.                     for a, b in pairs(pethingy) do
  186.                         coroutine.wrap(function() FarmCoin(v.index, b) end)()
  187.                     end
  188.                     repeat task.wait() until not game:GetService("Workspace")["__THINGS"].Coins:FindFirstChild(v.index) or #game:GetService("Workspace")["__THINGS"].Coins[v.index].Pets:GetChildren() == 0
  189.                     warn(v.n .. " has been broken in", tick()-starttick)
  190.                 end
  191.             end
  192.  
  193.         elseif MainWindow.flags.FarmingType == 'Multi Target' then
  194.             local cointhiny = GetCoins(MainWindow.flags.FarmingArea)
  195.             for i = 1, #cointhiny do
  196.                 if i%#pethingy == #pethingy-1 then wait() end
  197.                 if not CurrentFarmingPets[pethingy[i%#pethingy+1]] or CurrentFarmingPets[pethingy[i%#pethingy+1]] == nil then
  198. wait(0.1)
  199.                     spawn(function()
  200.                         CurrentFarmingPets[pethingy[i%#pethingy+1]] = 'Farming'
  201.                         FarmCoin(cointhiny[i].index, pethingy[i%#pethingy+1])
  202.                         repeat rs:wait() until not game:GetService("Workspace")["__THINGS"].Coins:FindFirstChild(cointhiny[i].index) or #game:GetService("Workspace")["__THINGS"].Coins:FindFirstChild(cointhiny[i].index).Pets:GetChildren() == 0
  203.                         CurrentFarmingPets[pethingy[i%#pethingy+1]] = nil
  204.                     end)
  205.                 end
  206.             end
  207.  
  208.         elseif MainWindow.flags.FarmingType == 'Highest Value' then
  209.             local cointhiny = GetCoinTable(MainWindow.flags.FarmingArea)
  210.             for a,b in pairs(pethingy) do
  211.                 spawn(function() wait() FarmCoin(cointhiny[1].index, b) end)
  212.             end
  213.             repeat rs:wait() until not game:GetService("Workspace")["__THINGS"].Coins:FindFirstChild(cointhiny[1].index) or #game:GetService("Workspace")["__THINGS"].Coins[cointhiny[1].index].Pets:GetChildren() == 0
  214.  
  215.         elseif MainWindow.flags.FarmingType == 'Nearest' then
  216.             local NearestOne = nil
  217.             local NearestDistance = math.huge
  218.             for i,v in pairs(game:GetService("Workspace")["__THINGS"].Coins:GetChildren()) do
  219.                 if (v.POS.Position - game.Players.LocalPlayer.Character.HumanoidRootPart.Position).Magnitude < NearestDistance then
  220.                     NearestOne = v
  221.                     NearestDistance = (v.POS.Position - game.Players.LocalPlayer.Character.HumanoidRootPart.Position).Magnitude
  222.                 end
  223.             end
  224.             for a,b in pairs(pethingy) do
  225.                 spawn(function() FarmCoin(NearestOne.Name, b) end)
  226.             end
  227.         end
  228.     end
  229. end)
  230. MainWindow:Dropdown("Type", {flag = 'FarmingType', list = {'Normal', 'Chest', 'Multi Target', 'Highest Value', 'Nearest'}})
  231. MainWindow:Dropdown("If chest", {flag = 'FarmingSingleChest', list = Chests})
  232. MainWindow:Dropdown("Area", {flag = 'FarmingArea', list = AreaList})
  233. MainWindow:Toggle("Collect Loot Bags", {flag = 'Lootbags', default = _G.Lootbags or false}, function()
  234.     if MainWindow.flags.Lootbags then
  235.         local Running = {}
  236.         while wait() and MainWindow.flags.Lootbags do
  237.             for i, v in pairs(game:GetService("Workspace")["__THINGS"].Lootbags:GetChildren()) do
  238.                 spawn(function()
  239.                     if v ~= nil and v.ClassName == 'MeshPart' then
  240.                         if not Running[v.Name] then
  241.                             Running[v.Name] = true
  242.                             local StartTick = tick()
  243.                             v.Transparency = 1
  244.                             for a,b in pairs(v:GetChildren()) do
  245.                                 if not string.find(b.Name, "Body") then
  246.                                     b:Destroy()
  247.                                 end
  248.                             end
  249.                             repeat task.wait()
  250.                                 v.CFrame = game.Players.LocalPlayer.Character:WaitForChild("HumanoidRootPart").CFrame
  251.                             until v == nil or not v.Parent or tick() > StartTick + 3
  252.                             Running[v.Name] = nil
  253.                         end
  254.                     end
  255.                 end)
  256.             end
  257.         end
  258.     end
  259. end)
  260. MainWindow:Button("Stat Tracker", function()
  261.     loadstring(game:HttpGet('https://pastebin.com/raw/dPXXyp4A'))()
  262.     wait(60)
  263.     warn("60s has PASSED!")
  264. end)
  265.  
  266. MainWindow:Button("POSSIBLE Lag reduction", function()
  267.     game:GetService("Players").LocalPlayer.PlayerScripts.Scripts.GUIs["Coin Rewards HUD"].Disabled = true
  268.     if game:GetService("Workspace"):FindFirstChild("__DEBRIS") then
  269.       game:GetService("Workspace")["__DEBRIS"]:Destroy()
  270.     end
  271. end)
  272.  
  273.  
  274. local MyEggData = {}
  275. local littleuselesstable = {}
  276. local GameLibrary = require(game:GetService("ReplicatedStorage"):WaitForChild("Framework"):WaitForChild("Library"))
  277. for i,v in pairs(GameLibrary.Directory.Eggs) do
  278.     local temptable = {}
  279.     temptable['Name'] = i
  280.     temptable['Currency'] = v.currency
  281.     temptable['Price'] = v.cost
  282.     table.insert(MyEggData, temptable)
  283. end
  284.  
  285. table.sort(MyEggData, function(a, b)
  286.     return a.Price < b.Price
  287. end)
  288.  
  289. local EggData = {}
  290. for i,v in pairs(CurrencyOrder) do
  291.     table.insert(EggData, " ")
  292.     table.insert(EggData, "-- "..v.." --")
  293.     for a,b in pairs(MyEggData) do
  294.         if b.Currency == v then
  295.             table.insert(EggData, b.Name)
  296.         end
  297.     end
  298. end
  299.  
  300. EggsWindow:Toggle("Open Eggs", {flag = 'OpenEggs'}, function(new)
  301.     while wait() and EggsWindow.flags.OpenEggs do
  302.         local ohTable1 = {
  303.             [1] = EggsWindow.flags.SelectedEgg,
  304.             [2] = EggsWindow.flags.TripleEggs
  305.         }
  306.         workspace.__THINGS.__REMOTES["buy egg"]:InvokeServer(ohTable1)
  307.     end
  308. end)
  309. EggsWindow:Dropdown('Egg', {flag = 'SelectedEgg', list = EggData})
  310. EggsWindow:Toggle("Triple Eggs", {flag = 'TripleEggs'})
  311. EggsWindow:Section(" ")
  312. EggsWindow:Button("Remove Egg animation", function()
  313.     for i,v in pairs(getgc(true)) do
  314.         if (typeof(v) == 'table' and rawget(v, 'OpenEgg')) then
  315.             v.OpenEgg = function()
  316.                 return
  317.             end
  318.         end
  319.     end
  320. end)
  321. EggsWindow:Button("Teleport Gamepass", function()
  322.     local main = debug.getupvalues(require(game.ReplicatedStorage:WaitForChild("Framework"):WaitForChild("Library")).Save.Get)[2][game.Players.LocalPlayer].save.Gamepasses
  323.     table.insert(main,18674296)
  324.     table.insert(main,18674298)
  325.     table.insert(main,18674321)
  326. end)
  327.  
  328. EggsWindow:Section("amGerard || Gerard#0001")
  329.  
  330. --Anti AFK stolen from infinite yield // the readily available old one :)
  331. local GC = getconnections or get_signal_cons
  332. if GC then
  333.     for i,v in pairs(GC(game.Players.LocalPlayer.Idled)) do
  334.         if v["Disable"] then
  335.             v["Disable"](v)
  336.         elseif v["Disconnect"] then
  337.             v["Disconnect"](v)
  338.         end
  339.     end
  340. else
  341.     print("lol bad exploit")
  342.     local vu = game:GetService("VirtualUser")
  343.     game:GetService("Players").LocalPlayer.Idled:connect(function()
  344.         vu:Button2Down(Vector2.new(0,0),workspace.CurrentCamera.CFrame)
  345.         wait(1)
  346.         vu:Button2Up(Vector2.new(0,0),workspace.CurrentCamera.CFrame)
  347.     end)
  348. end
  349.  
  350. warn("Everything has loaded fully. Enjoy :)")
  351. ]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement