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 Simulator X")
- local b = w:CreateFolder("AutoFarm")
- local f = w:CreateFolder("AutoBuy")
- local e = w:CreateFolder("Mix")
- local u = w:CreateFolder("Credits")
- SelectedArea = "Spawn"
- Areas = {}
- for i,v in pairs(game:GetService("Workspace")["__MAP"].Areas:GetChildren()) do
- table.insert(Areas,v.Name)
- end
- SelectedEgg = "Cracked Egg"
- Eggs = {}
- for i,v in pairs(game:GetService("ReplicatedStorage").Game.Eggs:GetChildren()) do
- table.insert(Eggs,v.Name)
- end
- b:Toggle("AutoCoin v1 (Pro)",function(bool)
- shared.toggle = bool
- AutoFarmClosestPartv1 = bool
- end)
- b:Toggle("AutoCoin v2 (Noob)",function(bool)
- shared.toggle = bool
- AutoFarmClosestPartv2 = bool
- end)
- b:Toggle("AutoCollectDrop",function(bool)
- shared.toggle = bool
- AutoCollectDrop = bool
- end)
- f:Dropdown("Select Egg",Eggs,true,function(a)
- SelectedEgg = a
- end)
- f:Toggle("Buy Egg",function(bool)
- shared.toggle = bool
- AutoBuyEgg = bool
- end)
- e:Toggle("AntiAfk",function(bool)
- shared.toggle = bool
- AntiAfk = bool
- end)
- e:Dropdown("Selecte Area",Areas,true,function(a)
- SelectedArea = a
- end)
- e:Button("Tp Area",function()
- game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(game:GetService("Workspace")["__MAP"].Areas[SelectedArea].Ground.CFrame.Position + Vector3.new(0,30,0))
- end)
- --Credits
- u:Button("maxgat5#8395",function()
- setclipboard("maxgat5#8395")
- end)
- u:Button("Discord Server",function()
- setclipboard("https://discord.gg/K4txdRSVfq")
- end)
- function ClosestPart()
- local dist = math.huge
- local target = nil
- for i,v in pairs(game:GetService("Workspace")["__THINGS"].Coins:GetChildren()) do
- if v.ClassName == "Folder" then
- if v:FindFirstChild("Coin") then
- if v.Coin.Transparency == 0 then
- local magnitude = (v.Coin.Position - game:GetService("Players").LocalPlayer.Character.Head.Position).magnitude
- if magnitude < dist then
- dist = magnitude
- target = v.Name
- end
- end
- end
- end
- end
- return target
- end
- spawn(function()
- while wait() do
- pcall(function()
- if AutoFarmClosestPartv1 == true then
- for i,v in pairs(game:GetService("Workspace")["__THINGS"].Pets:GetChildren()) do
- if v.ClassName == "Part" then
- if AutoFarmClosestPartv1 == true then
- workspace.__THINGS.__REMOTES["join coin"]:InvokeServer({tostring(ClosestPart()),{tostring(v.Name)}})
- workspace.__THINGS.__REMOTES["farm coin"]:FireServer({tostring(ClosestPart()),tostring(v.Name)})
- end
- end
- end
- end
- end)
- pcall(function()
- if AutoFarmClosestPartv2 == true then
- for i,v in pairs(game:GetService("Workspace")["__THINGS"].Pets:GetChildren()) do
- if v.ClassName == "Part" then
- if AutoFarmClosestPartv2 == true then
- game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(game:GetService("Workspace")["__THINGS"].Coins[ClosestPart()].Coin.CFrame.Position + Vector3.new(0,0,0))
- spawn(function()
- workspace.__THINGS.__REMOTES["join coin"]:InvokeServer({tostring(ClosestPart()),{tostring(v.Name)}})
- workspace.__THINGS.__REMOTES["farm coin"]:FireServer({tostring(ClosestPart()),tostring(v.Name)})
- end)
- end
- end
- end
- end
- end)
- end
- end)
- game:GetService('RunService').Stepped:connect(function()
- spawn(function()
- pcall(function()
- if AutoCollectDrop == true then
- for i,v in pairs(game:GetService("Workspace")["__THINGS"].Orbs:GetChildren()) do
- v.CanCollide = false
- v.CFrame = game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame + Vector3.new(0,0,0)
- end
- end
- end)
- end)
- spawn(function()
- pcall(function()
- if AutoBuyEgg == true then
- workspace.__THINGS.__REMOTES["buy egg"]:InvokeServer({tostring(SelectedEgg),false})
- end
- end)
- end)
- spawn(function()
- if AntiAfk == true then
- local bb=game:service'VirtualUser'
- bb:CaptureController()
- bb:ClickButton2(Vector2.new())
- end
- end)
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement