Advertisement
anonmods

Pet 1egends - Roblox - AnonMods

Sep 18th, 2021
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.13 KB | None | 0 0
  1. local library = loadstring(game:HttpGet(('https://raw.githubusercontent.com/Maxgat5/UiLib/main/lua')))()
  2. local w = library:CreateWindow("Pet Legends")
  3. local b = w:CreateFolder("AutoFarm")
  4. local f = w:CreateFolder("AutoBuy")
  5. local e = w:CreateFolder("Mix")
  6. local u = w:CreateFolder("Credits")
  7. Eggs = {}
  8. SelectedEgg = ""
  9. for i,v in pairs(game:GetService("Workspace").Eggs:GetChildren()) do
  10. if string.find(v.Name,"Egg") then
  11. table.insert(Eggs,v.Name)
  12. end
  13. end
  14.  
  15. b:Toggle("AutoCash",function(bool)
  16. shared.toggle = bool
  17. AutoCash = bool
  18. end)
  19.  
  20. f:Dropdown("Select Egg",Eggs,true,function(a)
  21. SelectedEgg = a
  22. end)
  23.  
  24. f:Toggle("Egg",function(bool)
  25. shared.toggle = bool
  26. Egg = bool
  27. end)
  28.  
  29. e:Toggle("AntiAfk",function(bool)
  30. shared.toggle = bool
  31. AntiAfk = bool
  32. end)
  33.  
  34. --Credits
  35. u:Button(game:service("HttpService"):JSONDecode(game:HttpGet("https://raw.githubusercontent.com/Maxgat5/Decode/main/JSON")).username,function()
  36. setclipboard(game:service("HttpService"):JSONDecode(game:HttpGet("https://raw.githubusercontent.com/Maxgat5/Decode/main/JSON")).username)
  37. end)
  38.  
  39. u:Button("Discord Server",function()
  40. setclipboard(game:service("HttpService"):JSONDecode(game:HttpGet("https://raw.githubusercontent.com/Maxgat5/Decode/main/JSON")).discord)
  41. end)
  42.  
  43. game:GetService('RunService').Stepped:connect(function()
  44. spawn(function()
  45. if AntiAfk == true then
  46. local bb=game:service'VirtualUser'
  47. bb:CaptureController()
  48. bb:ClickButton2(Vector2.new())
  49. end
  50. end)
  51. end)
  52.  
  53. function ClosestPart()
  54. local dist = math.huge
  55. local target = nil
  56. for i,v in pairs(game:GetService("Workspace").money:GetChildren()) do
  57. local magnitude = (v.Root.Position - game:GetService("Players").LocalPlayer.Character.Head.Position).magnitude
  58. if magnitude < dist then
  59. dist = magnitude
  60. target = v.Name
  61. end
  62. end
  63. return target
  64. end
  65.  
  66. function ClosestPart1()
  67. local dist = math.huge
  68. local target = nil
  69. for i,v in pairs(game:GetService("Workspace").Spawners:GetChildren()) do
  70. local magnitude = (v.Position - game:GetService("Players").LocalPlayer.Character.Head.Position).magnitude
  71. if magnitude < dist then
  72. dist = magnitude
  73. target = v.Name
  74. end
  75. end
  76. return target
  77. end
  78.  
  79. spawn(function()
  80. while wait() do
  81. if AutoCash == true then
  82. pcall(function()
  83. allow = true
  84. remember = ClosestPart()
  85. repeat wait()
  86. if allow == true then
  87. pcall(function()
  88. number = 0
  89. for i,v in pairs(game:GetService("Players").LocalPlayer.PlayerGui.GameGui.Pets.List:GetChildren()) do
  90. if v:FindFirstChild("Background") then
  91. if v.Background.BackgroundColor3 == Color3.fromRGB(85, 255, 0) then
  92. number = number + 1
  93. end
  94. end
  95. end
  96. for i=1,number do
  97. pcall(function()
  98. allow = false
  99. local args = {
  100. [1] = game:GetService("ReplicatedStorage").Currency[ClosestPart1()][remember],
  101. [2] = false,
  102. }
  103. game:GetService("ReplicatedStorage").Events.GiveTarget:InvokeServer(unpack(args))
  104. end)
  105. end
  106. end)
  107. end
  108. until not game:GetService("Workspace").money:FindFirstChild(remember) or AutoCash == false
  109. end)
  110. end
  111. end
  112. end)
  113.  
  114. spawn(function()
  115. while wait() do
  116. if Egg == true then
  117. game:GetService("ReplicatedStorage").Events.BuyEgg:InvokeServer(SelectedEgg,1)
  118. end
  119. end
  120. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement