Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local library = loadstring(game:HttpGet(('https://raw.githubusercontent.com/Maxgat5/UiLib/main/lua')))()
- local w = library:CreateWindow("Pet Legends")
- local b = w:CreateFolder("AutoFarm")
- local f = w:CreateFolder("AutoBuy")
- local e = w:CreateFolder("Mix")
- local u = w:CreateFolder("Credits")
- Eggs = {}
- SelectedEgg = ""
- for i,v in pairs(game:GetService("Workspace").Eggs:GetChildren()) do
- if string.find(v.Name,"Egg") then
- table.insert(Eggs,v.Name)
- end
- end
- b:Toggle("AutoCash",function(bool)
- shared.toggle = bool
- AutoCash = bool
- end)
- f:Dropdown("Select Egg",Eggs,true,function(a)
- SelectedEgg = a
- end)
- f:Toggle("Egg",function(bool)
- shared.toggle = bool
- Egg = bool
- end)
- e:Toggle("AntiAfk",function(bool)
- shared.toggle = bool
- AntiAfk = bool
- end)
- --Credits
- u:Button(game:service("HttpService"):JSONDecode(game:HttpGet("https://raw.githubusercontent.com/Maxgat5/Decode/main/JSON")).username,function()
- setclipboard(game:service("HttpService"):JSONDecode(game:HttpGet("https://raw.githubusercontent.com/Maxgat5/Decode/main/JSON")).username)
- end)
- u:Button("Discord Server",function()
- setclipboard(game:service("HttpService"):JSONDecode(game:HttpGet("https://raw.githubusercontent.com/Maxgat5/Decode/main/JSON")).discord)
- end)
- game:GetService('RunService').Stepped:connect(function()
- spawn(function()
- if AntiAfk == true then
- local bb=game:service'VirtualUser'
- bb:CaptureController()
- bb:ClickButton2(Vector2.new())
- end
- end)
- end)
- function ClosestPart()
- local dist = math.huge
- local target = nil
- for i,v in pairs(game:GetService("Workspace").money:GetChildren()) do
- local magnitude = (v.Root.Position - game:GetService("Players").LocalPlayer.Character.Head.Position).magnitude
- if magnitude < dist then
- dist = magnitude
- target = v.Name
- end
- end
- return target
- end
- function ClosestPart1()
- local dist = math.huge
- local target = nil
- for i,v in pairs(game:GetService("Workspace").Spawners:GetChildren()) do
- local magnitude = (v.Position - game:GetService("Players").LocalPlayer.Character.Head.Position).magnitude
- if magnitude < dist then
- dist = magnitude
- target = v.Name
- end
- end
- return target
- end
- spawn(function()
- while wait() do
- if AutoCash == true then
- pcall(function()
- allow = true
- remember = ClosestPart()
- repeat wait()
- if allow == true then
- pcall(function()
- number = 0
- for i,v in pairs(game:GetService("Players").LocalPlayer.PlayerGui.GameGui.Pets.List:GetChildren()) do
- if v:FindFirstChild("Background") then
- if v.Background.BackgroundColor3 == Color3.fromRGB(85, 255, 0) then
- number = number + 1
- end
- end
- end
- for i=1,number do
- pcall(function()
- allow = false
- local args = {
- [1] = game:GetService("ReplicatedStorage").Currency[ClosestPart1()][remember],
- [2] = false,
- }
- game:GetService("ReplicatedStorage").Events.GiveTarget:InvokeServer(unpack(args))
- end)
- end
- end)
- end
- until not game:GetService("Workspace").money:FindFirstChild(remember) or AutoCash == false
- end)
- end
- end
- end)
- spawn(function()
- while wait() do
- if Egg == true then
- game:GetService("ReplicatedStorage").Events.BuyEgg:InvokeServer(SelectedEgg,1)
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement