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("Hat Magnet Simulator")
- local b = w:CreateFolder("AutoFarm")
- local f = w:CreateFolder("AutoBuy")
- local e = w:CreateFolder("Mix")
- local u = w:CreateFolder("Credits")
- SelectedEgg = ""
- Eggs = {}
- for i,v in pairs(game:GetService("Workspace").Eggs:GetChildren()) do
- if not table.find(Eggs,v.Name) then
- table.insert(Eggs,v.Name)
- end
- end
- Ranges = {}
- for i,v in pairs(game:GetService("Players").LocalPlayer.PlayerGui.Main.IngameShopFrame.Main.RangesFrame:GetDescendants()) do
- if v.ClassName == "TextLabel" then
- if v.Name == "RangeName" then
- if not table.find(Ranges,v.Text) then
- table.insert(Ranges,v.Text)
- end
- end
- end
- end
- Ranks = {}
- for i,v in pairs(game:GetService("Players").LocalPlayer.PlayerGui.Main.IngameShopFrame.Main.RanksFrame:GetDescendants()) do
- if v.ClassName == "TextLabel" then
- if v.Name == "RangeName" then
- if not table.find(Ranks,v.Text) then
- table.insert(Ranks,v.Text)
- end
- end
- end
- end
- Upgrade = {}
- for i,v in pairs(game:GetService("Players").LocalPlayer.PlayerGui.Main.IngameShopFrame.Main.UpgradesFrame:GetDescendants()) do
- if v.ClassName == "TextLabel" then
- if v.Name == "RangeName" then
- if not table.find(Upgrade,v.Text) then
- table.insert(Upgrade,v.Text)
- end
- end
- end
- end
- Speed = 50
- SelectedArea = ""
- Area = {}
- for i,v in pairs(game:GetService("Workspace").SpawnedHats:GetChildren()) do
- if not table.find(Area,v.Name) then
- table.insert(Area,v.Name)
- end
- end
- b:Dropdown("Select Area",Area,true,function(a)
- SelectedArea = a
- end)
- b:Toggle("AutoTpHat v1",function(bool)
- shared.toggle = bool
- AutoTpHatv1 = bool
- end)
- b:Toggle("AutoTpHat v2",function(bool)
- shared.toggle = bool
- AutoTpHatv2 = bool
- end)
- b:Toggle("AutoSell",function(bool)
- shared.toggle = bool
- AutoSellv1 = bool
- end)
- f:Dropdown("Select Egg",Eggs,true,function(a)
- SelectedEgg = a
- end)
- f:Toggle("Egg",function(bool)
- shared.toggle = bool
- Egg = bool
- end)
- f:Toggle("Ranges",function(bool)
- shared.toggle = bool
- Ranges1 = bool
- end)
- f:Toggle("Ranks",function(bool)
- shared.toggle = bool
- Ranks1 = bool
- end)
- f:Toggle("Upgrade",function(bool)
- shared.toggle = bool
- Upgrade1 = bool
- end)
- f:Toggle("Rebirth",function(bool)
- shared.toggle = bool
- Rebirth = bool
- end)
- f:Toggle("Sacrifice",function(bool)
- shared.toggle = bool
- Sacrifice = bool
- end)
- e:Toggle("AntiAfk",function(bool)
- shared.toggle = bool
- AntiAfk = bool
- end)
- e:Box("Speed Amount","number",function(value)
- Speed = value
- end)
- e:Button("Speed",function()
- game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = Speed
- end)
- e:Button("Open Shop",function()
- firetouchinterest(game.Players.LocalPlayer.Character.HumanoidRootPart, game:GetService("Workspace").TouchParts.Shop, 0)
- wait(.1)
- firetouchinterest(game.Players.LocalPlayer.Character.HumanoidRootPart, game:GetService("Workspace").TouchParts.Shop, 1)
- wait(.1)
- end)
- --Credits
- u:Label("Youtube Subs: "..getgenv().Subscribers,{
- TextSize = 25;
- TextColor = Color3.fromRGB(255,255,255);
- BgColor = Color3.fromRGB(69,69,69)
- })
- u:Label("Discord Members: "..getgenv().TotalMembers,{
- TextSize = 25;
- TextColor = Color3.fromRGB(255,255,255);
- BgColor = Color3.fromRGB(69,69,69)
- })
- u:Label("Pastebin Views: "..getgenv().TotalPastebinViews,{
- TextSize = 25;
- TextColor = Color3.fromRGB(255,255,255);
- BgColor = Color3.fromRGB(69,69,69)
- })
- u:Button("Discord Server",function()
- setclipboard(getgenv().Discord)
- end)
- u:Button("Youtube Channel",function()
- setclipboard(getgenv().Youtube)
- end)
- u:Button("Pastebin Page",function()
- setclipboard(getgenv().Pastebin)
- end)
- u:Button(getgenv().Username,function()
- setclipboard(getgenv().Username)
- 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)
- spawn(function()
- while wait() do
- if AutoTpHatv1 == true then
- pcall(function()
- function ClosestPart()
- local dist = 50
- local target = nil
- for i,v in pairs(game:GetService("Workspace").SpawnedHats:GetChildren()) do
- if v.Name == SelectedArea then
- for i,v1 in pairs(v:GetChildren()) do
- if v1.ClassName == "Part" then
- if v1.Transparency ~= 1 then
- local magnitude = (v1.Position - game:GetService("Players").LocalPlayer.Character.Head.Position).magnitude
- if magnitude > dist then
- dist = magnitude
- target = v1
- end
- end
- end
- end
- end
- end
- return target
- end
- local tool = game.Players.LocalPlayer.Backpack:FindFirstChildOfClass("Tool") or game.Players.LocalPlayer.Character:FindFirstChildOfClass("Tool")
- game.Players.LocalPlayer.Character.Humanoid:EquipTool(tool)
- game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(ClosestPart().CFrame.Position + Vector3.new(0,0,0))
- end)
- end
- end
- end)
- spawn(function()
- while wait() do
- if AutoTpHatv2 == true then
- pcall(function()
- function ClosestPart()
- local dist = math.huge
- local target = nil
- for i,v in pairs(game:GetService("Workspace").SpawnedHats:GetChildren()) do
- if v.Name == SelectedArea then
- for i,v1 in pairs(v:GetChildren()) do
- if v1.ClassName == "Part" then
- if v1.Transparency ~= 1 then
- local magnitude = (v1.Position - game:GetService("Players").LocalPlayer.Character.Head.Position).magnitude
- if magnitude < dist then
- dist = magnitude
- target = v1
- end
- end
- end
- end
- end
- end
- return target
- end
- local tool = game.Players.LocalPlayer.Backpack:FindFirstChildOfClass("Tool") or game.Players.LocalPlayer.Character:FindFirstChildOfClass("Tool")
- game.Players.LocalPlayer.Character.Humanoid:EquipTool(tool)
- game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(ClosestPart().CFrame.Position + Vector3.new(0,0,0))
- end)
- end
- end
- end)
- spawn(function()
- while wait() do
- if AutoSellv1 == true then
- firetouchinterest(game.Players.LocalPlayer.Character.HumanoidRootPart, game:GetService("Workspace").TouchParts.Sell, 0)
- wait(.1)
- firetouchinterest(game.Players.LocalPlayer.Character.HumanoidRootPart, game:GetService("Workspace").TouchParts.Sell, 1)
- wait(.1)
- end
- end
- end)
- spawn(function()
- while wait() do
- if Ranges1 == true then
- for i,v in pairs(Ranges) do
- game:GetService("ReplicatedStorage").GameClient.Events.RemoteFunctions.BuyRange:InvokeServer(tostring(v),"Range")
- end
- end
- end
- end)
- spawn(function()
- while wait() do
- if Ranks1 == true then
- for i,v in pairs(Ranks) do
- game:GetService("ReplicatedStorage").GameClient.Events.RemoteFunctions.BuyRange:InvokeServer(tostring(v),"Rank")
- end
- end
- end
- end)
- spawn(function()
- while wait() do
- if Upgrade1 == true then
- for i,v in pairs(Upgrade) do
- game:GetService("ReplicatedStorage").GameClient.Events.RemoteFunctions.BuyRange:InvokeServer(tostring(v),"Upgrade")
- end
- end
- end
- end)
- spawn(function()
- while wait() do
- if Rebirth == true then
- game:GetService("ReplicatedStorage").GameClient.Events.RemoteFunctions.Rebirth:InvokeServer("Rebirth",1)
- end
- end
- end)
- spawn(function()
- while wait() do
- if Sacrifice == true then
- game:GetService("ReplicatedStorage").GameClient.Events.RemoteFunctions.Rebirth:InvokeServer("Sacrifice")
- end
- end
- end)
- spawn(function()
- while wait() do
- if Egg == true then
- game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(game:GetService("Workspace").Eggs[SelectedEgg].EggModel.Egg.CFrame.Position + Vector3.new(0,0,0))
- game:GetService("ReplicatedStorage").GameClient.Events.RemoteFunctions.EggOpened:InvokeServer(tostring(SelectedEgg),"Single")
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment