Gerard_games

epic search

Sep 28th, 2021 (edited)
1,479
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.04 KB | None | 0 0
  1. if game.PlaceId == 6284583030 then
  2. repeat wait() until game:GetService("Players")
  3. repeat wait() until game:GetService("Players").LocalPlayer
  4. repeat wait() until game:GetService("Players").LocalPlayer:WaitForChild("PlayerGui"):WaitForChild("Loading"):WaitForChild("Black").BackgroundTransparency == 1
  5. repeat wait() until game:GetService("Players").LocalPlayer.Character:FindFirstChild("HumanoidRootPart")
  6.  
  7. local GameLibrary = require(game:GetService("ReplicatedStorage").Framework.Library)
  8. local IDToName = {}
  9. local PettoRarity = {}
  10. for i,v in pairs(GameLibrary.Directory.Pets) do
  11. IDToName[i] = v.name
  12. PettoRarity[i] = v.rarity
  13. end
  14. local tablething = {
  15. [1] = 'I';
  16. [2] = 'II';
  17. [3] = 'III';
  18. [4] = 'IV';
  19. [5] = 'V'
  20. }
  21. _G.Connections = {}
  22. local Inventory = game:GetService("Players").LocalPlayer.PlayerGui.Inventory.Frame
  23. local Query = Inventory.Bottom.Search.Query
  24. local NewQuery = Query:Clone()
  25. NewQuery.Parent = Query.Parent
  26. Query:Destroy()
  27.  
  28. function UpdateInventory()
  29. local NewText = NewQuery.Text
  30. NewText = NewText:lower()
  31. for i,v in pairs(GameLibrary.Save.Get().Pets) do
  32. local ThingyThingyTempTypeThing = (v.g and 'Gold') or (v.r and 'Rainbow') or (v.dm and 'Dark Matter') or 'Normal'
  33. local Enchantments = ""
  34. if v.powers then
  35. for aa,bb in pairs(v.powers) do
  36. if bb[1] == 'Teamwork' and bb[2] == 2 then Enchantments = Enchantments .. " STW\n" end
  37. if bb[1] == 'Tech Coins' then Enchantments = Enchantments .. "TC " .. bb[2].." \n" end
  38. if bb[1] == 'Tech Coins' then Enchantments = Enchantments .. "TC " .. tablething[bb[2]].." \n" end
  39. if bb[1] == 'Tech Coins' then Enchantments = Enchantments .. "TC" .. bb[2].." \n" end
  40. if bb[1] == 'Tech Coins' then Enchantments = Enchantments .. "TC" .. tablething[bb[2]].." \n" end
  41. if bb[1] == 'Chests' then Enchantments = Enchantments .. "CB " .. tablething[bb[2]].." \n" end
  42. if bb[1] == 'Chests' then Enchantments = Enchantments .. "CB " .. bb[2].." \n" end
  43. if bb[1] == 'Chests' then Enchantments = Enchantments .. "CB" .. tablething[bb[2]].." \n" end
  44. if bb[1] == 'Chests' then Enchantments = Enchantments .. "CB" .. bb[2].." \n" end
  45. if bb[1] == 'Chests' then Enchantments = Enchantments .. "Chest Breaker " .. tablething[bb[2]].." \n" end
  46. if bb[1] == 'Chests' then Enchantments = Enchantments .. "Chest Breaker " .. bb[2].." \n" end
  47. Enchantments = Enchantments .. bb[1] .. " " .. tablething[bb[2]].." \n"
  48. Enchantments = Enchantments .. bb[1] .. " " .. bb[2].." \n"
  49. end
  50. end
  51. if string.find(PettoRarity[v.id]:lower(), NewText) or string.find(ThingyThingyTempTypeThing:lower(), NewText) or string.find(IDToName[v.id]:lower(), NewText) or string.find(v.nk:lower(), NewText) or string.find(Enchantments:lower(), NewText) then
  52. Inventory.Main.Pets:FindFirstChild(v.uid).Visible = true
  53. else
  54. Inventory.Main.Pets:FindFirstChild(v.uid).Visible = false
  55. end
  56. end
  57. end
  58.  
  59. if _G.Connections["QueryConnect"] then _G.Connections["QueryConnect"]:Disconnect() end
  60. _G.Connections["QueryConnect"] = NewQuery:GetPropertyChangedSignal("Text"):Connect(UpdateInventory)
  61.  
  62. local Check = {'Rename', 'MultiDelete', 'Grid', 'EquipBest'}
  63. for _, v in pairs(Check) do
  64. if _G.Connections[v] then _G.Connections[v]:Disconnect() end
  65. _G.Connections[v] = Inventory.Bottom[v].Changed:Connect(UpdateInventory)
  66. end
  67. if _G.Connections['ContentSize'] then _G.Connections['ContentSize']:Disconnect() end
  68. _G.Connections['ContentSize'] = game:GetService("Players").LocalPlayer.PlayerGui.Inventory.Frame.Main.Pets.UIGridLayout.Changed:connect(UpdateInventory)
  69. if _G.Connections['EquippedChanged'] then _G.Connections['EquippedChanged']:Disconnect() end
  70. _G.Connections['EquippedChanged'] = game:GetService("Players").LocalPlayer.PlayerGui.Main.Bottom.Inventory.Equipped:GetPropertyChangedSignal("Text"):connect(UpdateInventory)
  71. if _G.Connections['InvAdd'] then _G.Connections['InvAdd']:Disconnect() end
  72. _G.Connections['InvAdd'] = Inventory.Main.Pets.ChildAdded:connect(UpdateInventory)
  73. if _G.Connections['InvRemove'] then _G.Connections['InvRemove']:Disconnect() end
  74. _G.Connections['InvRemove'] = Inventory.Main.Pets.ChildRemoved:connect(UpdateInventory)
  75. if _G.Connections['PetAdd'] then _G.Connections['PetAdd']:Disconnect() end
  76. _G.Connections['PetAdd'] = game:GetService("Workspace")["__THINGS"].Pets.ChildAdded:connect(UpdateInventory)
  77. if _G.Connections['PetRemove'] then _G.Connections['PetRemove']:Disconnect() end
  78. _G.Connections['PetRemove'] = game:GetService("Workspace")["__THINGS"].Pets.ChildRemoved:connect(UpdateInventory)
  79. end
  80.  
  81.  
Add Comment
Please, Sign In to add comment