-- Services Initialization local Players = game:GetService("Players") local RunService = game:GetService("RunService") local UserInputService = game:GetService("UserInputService") local VirtualUser = game:GetService("VirtualUser") local Lighting = game:GetService("Lighting") local CoreGui = game:GetService("CoreGui") local LocalPlayer = Players.LocalPlayer -- Global Configuration Variables getgenv().FlyFarm100m = false getgenv().AntiAFK = false getgenv().SpeedHack = false getgenv().LightBoost = false getgenv().Noclip = false getgenv().FlyEnabled = false getgenv().ShowPlayers = false getgenv().ShowBots = false -- Set max FPS cap if supported by executor if setfpscap then setfpscap(240) end -- Clean up existing UI instance to prevent duplicates if CoreGui:FindFirstChild("BaconScriptHub") then CoreGui.BaconScriptHub:Destroy() end -- Create ScreenGui Container local ScreenGui = Instance.new("ScreenGui") ScreenGui.Name = "BaconScriptHub" ScreenGui.ResetOnSpawn = false -- Attach ScreenGui safely to available GUI parent if gethui then ScreenGui.Parent = gethui() elseif syn and syn.protect_gui then syn.protect_gui(ScreenGui) ScreenGui.Parent = CoreGui else ScreenGui.Parent = CoreGui end -- Main Window Frame Setup local MainFrame = Instance.new("Frame") MainFrame.Name = "MainFrame" MainFrame.Parent = ScreenGui MainFrame.BackgroundColor3 = Color3.fromRGB(35, 25, 25) MainFrame.BorderSizePixel = 0 MainFrame.Position = UDim2.new(0.05, 0, 0.2, 0) MainFrame.Size = UDim2.new(0, 245, 0, 360) MainFrame.Active = true MainFrame.Draggable = true local Corner = Instance.new("UICorner") Corner.CornerRadius = UDim.new(0, 12) Corner.Parent = MainFrame local FrameStroke = Instance.new("UIStroke") FrameStroke.Parent = MainFrame FrameStroke.Color = Color3.fromRGB(180, 60, 60) FrameStroke.Thickness = 1.5 -- Header UI Elements (Icon, Title, Subtitle, FPS Counter) local BaconIcon = Instance.new("ImageLabel") BaconIcon.Parent = MainFrame BaconIcon.BackgroundTransparency = 1 BaconIcon.Position = UDim2.new(0.05, 0, 0.03, 0) BaconIcon.Size = UDim2.new(0, 32, 0, 32) BaconIcon.Image = "rbxassetid://6371098485" local Title = Instance.new("TextLabel") Title.Parent = MainFrame Title.BackgroundTransparency = 1 Title.Position = UDim2.new(0.22, 0, 0.03, 0) Title.Size = UDim2.new(0.45, 0, 0, 22) Title.Font = Enum.Font.FredokaOne Title.Text = "BACON SCRIPT" Title.TextColor3 = Color3.fromRGB(255, 120, 100) Title.TextSize = 17 Title.TextXAlignment = Enum.TextXAlignment.Left local FpsLabel = Instance.new("TextLabel") FpsLabel.Parent = MainFrame FpsLabel.BackgroundTransparency = 1 FpsLabel.Position = UDim2.new(0.68, 0, 0.03, 0) FpsLabel.Size = UDim2.new(0.27, 0, 0, 22) FpsLabel.Font = Enum.Font.SourceSansBold FpsLabel.Text = "FPS: --" FpsLabel.TextColor3 = Color3.fromRGB(100, 255, 100) FpsLabel.TextSize = 14 FpsLabel.TextXAlignment = Enum.TextXAlignment.Right local Subtitle = Instance.new("TextLabel") Subtitle.Parent = MainFrame Subtitle.BackgroundTransparency = 1 Subtitle.Position = UDim2.new(0.22, 0, 0.10, 0) Subtitle.Size = UDim2.new(0.73, 0, 0, 15) Subtitle.Font = Enum.Font.SourceSansItalic Subtitle.Text = "by nguyn.huy.bacon (B: Menu)" Subtitle.TextColor3 = Color3.fromRGB(180, 180, 180) Subtitle.TextSize = 11 Subtitle.TextXAlignment = Enum.TextXAlignment.Left local Line = Instance.new("Frame") Line.Parent = MainFrame Line.BackgroundColor3 = Color3.fromRGB(80, 40, 40) Line.BorderSizePixel = 0 Line.Position = UDim2.new(0.05, 0, 0.15, 0) Line.Size = UDim2.new(0.9, 0, 0, 2) -- Button Container Layout local Container = Instance.new("Frame") Container.Parent = MainFrame Container.BackgroundTransparency = 1 Container.Position = UDim2.new(0, 0, 0.17, 0) Container.Size = UDim2.new(1, 0, 0.83, 0) local UIList = Instance.new("UIListLayout") UIList.Parent = Container UIList.SortOrder = Enum.SortOrder.LayoutOrder UIList.Padding = UDim.new(0, 4) UIList.HorizontalAlignment = Enum.HorizontalAlignment.Center -- Helper Function to Create Styled Toggle Buttons local function createButton(text) local btn = Instance.new("TextButton") btn.Size = UDim2.new(0.9, 0, 0, 28) btn.BackgroundColor3 = Color3.fromRGB(150, 40, 40) btn.Font = Enum.Font.SourceSansBold btn.Text = text .. ": OFF" btn.TextColor3 = Color3.fromRGB(255, 255, 255) btn.TextSize = 12 local btnCorner = Instance.new("UICorner") btnCorner.CornerRadius = UDim.new(0, 6) btnCorner.Parent = btn return btn end -- Instantiating Menu Buttons local FarmBtn = createButton("Auto Farm 100m (F)") FarmBtn.Parent = Container local SpeedBtn = createButton("Speed 300 (X)") SpeedBtn.Parent = Container local FlyBtn = createButton("Fly (E)") FlyBtn.Parent = Container local NoclipBtn = createButton("Noclip") NoclipBtn.Parent = Container local PlayerEspBtn = createButton("ESP Players (P)") PlayerEspBtn.Parent = Container local BotEspBtn = createButton("ESP Bots (N)") BotEspBtn.Parent = Container local BoostBtn = createButton("Fix Lag / Light Boost") BoostBtn.Parent = Container local AfkBtn = createButton("Anti-AFK") AfkBtn.Parent = Container -- Real-time FPS Calculation Loop local frameCount = 0 local lastCheck = os.clock() RunService.RenderStepped:Connect(function() frameCount = frameCount + 1 local now = os.clock() if now - lastCheck >= 1 then FpsLabel.Text = "FPS: " .. frameCount frameCount = 0 lastCheck = now end end) -- Keybind Input Listener System (B, F, X, E, P, N) UserInputService.InputBegan:Connect(function(input, gameProcessed) if gameProcessed then return end -- Key B: Show/Hide Menu Frame if input.KeyCode == Enum.KeyCode.B then MainFrame.Visible = not MainFrame.Visible -- Key F: Toggle Auto Farm 100m Mode elseif input.KeyCode == Enum.KeyCode.F then getgenv().FlyFarm100m = not getgenv().FlyFarm100m FarmBtn.Text = "Auto Farm 100m (F): " .. (getgenv().FlyFarm100m and "ON" or "OFF") FarmBtn.BackgroundColor3 = getgenv().FlyFarm100m and Color3.fromRGB(40, 160, 60) or Color3.fromRGB(150, 40, 40) -- Key X: Toggle Speed Hack elseif input.KeyCode == Enum.KeyCode.X then getgenv().SpeedHack = not getgenv().SpeedHack SpeedBtn.Text = "Speed 300 (X): " .. (getgenv().SpeedHack and "ON" or "OFF") SpeedBtn.BackgroundColor3 = getgenv().SpeedHack and Color3.fromRGB(40, 160, 60) or Color3.fromRGB(150, 40, 40) -- Key E: Toggle Fly Mode elseif input.KeyCode == Enum.KeyCode.E then getgenv().FlyEnabled = not getgenv().FlyEnabled FlyBtn.Text = "Fly (E): " .. (getgenv().FlyEnabled and "ON" or "OFF") FlyBtn.BackgroundColor3 = getgenv().FlyEnabled and Color3.fromRGB(40, 160, 60) or Color3.fromRGB(150, 40, 40) -- Key P: Toggle Player ESP elseif input.KeyCode == Enum.KeyCode.P then getgenv().ShowPlayers = not getgenv().ShowPlayers PlayerEspBtn.Text = "ESP Players (P): " .. (getgenv().ShowPlayers and "ON" or "OFF") PlayerEspBtn.BackgroundColor3 = getgenv().ShowPlayers and Color3.fromRGB(40, 160, 60) or Color3.fromRGB(150, 40, 40) -- Key N: Toggle Bot ESP elseif input.KeyCode == Enum.KeyCode.N then getgenv().ShowBots = not getgenv().ShowBots BotEspBtn.Text = "ESP Bots (N): " .. (getgenv().ShowBots and "ON" or "OFF") BotEspBtn.BackgroundColor3 = getgenv().ShowBots and Color3.fromRGB(40, 160, 60) or Color3.fromRGB(150, 40, 40) end end) -- WalkSpeed Modifier System RunService.RenderStepped:Connect(function() local char = LocalPlayer.Character if char then local hum = char:FindFirstChildOfClass("Humanoid") if hum then if getgenv().SpeedHack then local pressingWS = UserInputService:IsKeyDown(Enum.KeyCode.W) or UserInputService:IsKeyDown(Enum.KeyCode.S) if pressingWS then hum.WalkSpeed = 300 else hum.WalkSpeed = 16 end else if hum.WalkSpeed == 300 then hum.WalkSpeed = 16 end end end end end) -- ESP Billboard Creation Helper Function local function createEspBillboard(model, isBot) if model:FindFirstChild("BaconEspTag") then return end local head = model:FindFirstChild("Head") or model:FindFirstChild("HumanoidRootPart") if not head then return end local bb = Instance.new("BillboardGui") bb.Name = "BaconEspTag" bb.Adornee = head bb.Size = UDim2.new(0, 150, 0, 40) bb.StudsOffset = Vector3.new(0, 2.5, 0) bb.AlwaysOnTop = true local txt = Instance.new("TextLabel") txt.Name = "EspLabel" txt.Parent = bb txt.Size = UDim2.new(1, 0, 1, 0) txt.BackgroundTransparency = 1 txt.Font = Enum.Font.SourceSansBold txt.TextSize = 14 txt.TextColor3 = isBot and Color3.fromRGB(255, 80, 80) or Color3.fromRGB(80, 220, 255) txt.TextStrokeTransparency = 0 bb.Parent = head end -- ESP Update Loop for Players and Bots RunService.RenderStepped:Connect(function() local myChar = LocalPlayer.Character local myHrp = myChar and myChar:FindFirstChild("HumanoidRootPart") -- Clean & Update Players for _, plr in ipairs(Players:GetPlayers()) do if plr ~= LocalPlayer and plr.Character then local char = plr.Character local bb = char:FindFirstChild("Head") and char.Head:FindFirstChild("BaconEspTag") if getgenv().ShowPlayers then createEspBillboard(char, false) if bb and myHrp and char:FindFirstChild("HumanoidRootPart") then local dist = math.floor((myHrp.Position - char.HumanoidRootPart.Position).Magnitude * 0.28) -- Convert studs to meters bb.EspLabel.Text = plr.DisplayName .. " [" .. dist .. "m]" bb.Enabled = true end else if bb then bb.Enabled = false end end end end -- Clean & Update Bots/NPCs in Workspace for _, obj in ipairs(workspace:GetChildren()) do if obj:IsA("Model") and obj ~= myChar and obj:FindFirstChildOfClass("Humanoid") then if not Players:GetPlayerFromCharacter(obj) then local bb = obj:FindFirstChild("Head") and obj.Head:FindFirstChild("BaconEspTag") if getgenv().ShowBots then createEspBillboard(obj, true) if bb and myHrp and obj:FindFirstChild("HumanoidRootPart") then local dist = math.floor((myHrp.Position - obj.HumanoidRootPart.Position).Magnitude * 0.28) -- Convert studs to meters bb.EspLabel.Text = "[BOT] " .. obj.Name .. " [" .. dist .. "m]" bb.Enabled = true end else if bb then bb.Enabled = false end end end end end end) -- Fly Movement Mechanics local bodyVel, bodyGyro RunService.RenderStepped:Connect(function() local char = LocalPlayer.Character if char and char:FindFirstChild("HumanoidRootPart") then local hrp = char.HumanoidRootPart if getgenv().FlyEnabled then if not bodyVel or bodyVel.Parent ~= hrp then bodyVel = Instance.new("BodyVelocity") bodyVel.MaxForce = Vector3.new(1e6, 1e6, 1e6) bodyVel.Parent = hrp bodyGyro = Instance.new("BodyGyro") bodyGyro.MaxTorque = Vector3.new(1e6, 1e6, 1e6) bodyGyro.P = 10000 bodyGyro.Parent = hrp end local cam = workspace.CurrentCamera local moveDir = Vector3.zero if UserInputService:IsKeyDown(Enum.KeyCode.W) then moveDir = moveDir + cam.CFrame.LookVector end if UserInputService:IsKeyDown(Enum.KeyCode.S) then moveDir = moveDir - cam.CFrame.LookVector end if UserInputService:IsKeyDown(Enum.KeyCode.A) then moveDir = moveDir - cam.CFrame.RightVector end if UserInputService:IsKeyDown(Enum.KeyCode.D) then moveDir = moveDir + cam.CFrame.RightVector end if UserInputService:IsKeyDown(Enum.KeyCode.Space) then moveDir = moveDir + Vector3.new(0, 1, 0) end if UserInputService:IsKeyDown(Enum.KeyCode.LeftShift) then moveDir = moveDir - Vector3.new(0, 1, 0) end bodyVel.Velocity = moveDir * 100 bodyGyro.CFrame = cam.CFrame else if bodyVel then bodyVel:Destroy() bodyVel = nil end if bodyGyro then bodyGyro:Destroy() bodyGyro = nil end end end end) -- Noclip Execution RunService.Stepped:Connect(function() if getgenv().Noclip then local char = LocalPlayer.Character if char then for _, part in ipairs(char:GetDescendants()) do if part:IsA("BasePart") then part.CanCollide = false end end end end end) -- Auto Farm 100m Altitude Lock local targetY = nil local farmBv = nil RunService.Stepped:Connect(function() if getgenv().FlyFarm100m then local char = LocalPlayer.Character if char then for _, part in ipairs(char:GetDescendants()) do if part:IsA("BasePart") then part.CanCollide = false end end local hrp = char:FindFirstChild("HumanoidRootPart") if hrp then if not targetY then targetY = hrp.Position.Y + 100 end if not farmBv or farmBv.Parent ~= hrp then farmBv = Instance.new("BodyVelocity") farmBv.MaxForce = Vector3.new(1e5, 1e5, 1e5) farmBv.Velocity = Vector3.zero farmBv.Parent = hrp end hrp.CFrame = CFrame.new(hrp.Position.X, targetY, hrp.Position.Z) * hrp.CFrame.Rotation end end else targetY = nil if farmBv then farmBv:Destroy() farmBv = nil end end end) -- Light Boost Optimization local function applyLightBoost(enable) if enable then Lighting.GlobalShadows = false Lighting.FogEnd = 9e9 Lighting.Brightness = 1 settings().Rendering.QualityLevel = Enum.QualityLevel.Level01 for _, v in ipairs(workspace:GetChildren()) do if v:IsA("BasePart") then v.Material = Enum.Material.Plastic v.Reflectance = 0 elseif v:IsA("Decal") or v:IsA("Texture") then v.Transparency = 1 elseif v:IsA("ParticleEmitter") or v:IsA("Trail") then v.Enabled = false end end end end -- Anti-AFK Handler LocalPlayer.Idled:Connect(function() if getgenv().AntiAFK then VirtualUser:Button2Down(Vector2.new(0,0), workspace.CurrentCamera.CFrame) task.wait(1) VirtualUser:Button2Up(Vector2.new(0,0), workspace.CurrentCamera.CFrame) end end) -- UI Button Click Connections FarmBtn.MouseButton1Click:Connect(function() getgenv().FlyFarm100m = not getgenv().FlyFarm100m FarmBtn.Text = "Auto Farm 100m (F): " .. (getgenv().FlyFarm100m and "ON" or "OFF") FarmBtn.BackgroundColor3 = getgenv().FlyFarm100m and Color3.fromRGB(40, 160, 60) or Color3.fromRGB(150, 40, 40) end) SpeedBtn.MouseButton1Click:Connect(function() getgenv().SpeedHack = not getgenv().SpeedHack SpeedBtn.Text = "Speed 300 (X): " .. (getgenv().SpeedHack and "ON" or "OFF") SpeedBtn.BackgroundColor3 = getgenv().SpeedHack and Color3.fromRGB(40, 160, 60) or Color3.fromRGB(150, 40, 40) end) FlyBtn.MouseButton1Click:Connect(function() getgenv().FlyEnabled = not getgenv().FlyEnabled FlyBtn.Text = "Fly (E): " .. (getgenv().FlyEnabled and "ON" or "OFF") FlyBtn.BackgroundColor3 = getgenv().FlyEnabled and Color3.fromRGB(40, 160, 60) or Color3.fromRGB(150, 40, 40) end) NoclipBtn.MouseButton1Click:Connect(function() getgenv().Noclip = not getgenv().Noclip NoclipBtn.Text = "Noclip: " .. (getgenv().Noclip and "ON" or "OFF") NoclipBtn.BackgroundColor3 = getgenv().Noclip and Color3.fromRGB(40, 160, 60) or Color3.fromRGB(150, 40, 40) end) PlayerEspBtn.MouseButton1Click:Connect(function() getgenv().ShowPlayers = not getgenv().ShowPlayers PlayerEspBtn.Text = "ESP Players (P): " .. (getgenv().ShowPlayers and "ON" or "OFF") PlayerEspBtn.BackgroundColor3 = getgenv().ShowPlayers and Color3.fromRGB(40, 160, 60) or Color3.fromRGB(150, 40, 40) end) BotEspBtn.MouseButton1Click:Connect(function() getgenv().ShowBots = not getgenv().ShowBots BotEspBtn.Text = "ESP Bots (N): " .. (getgenv().ShowBots and "ON" or "OFF") BotEspBtn.BackgroundColor3 = getgenv().ShowBots and Color3.fromRGB(40, 160, 60) or Color3.fromRGB(150, 40, 40) end) BoostBtn.MouseButton1Click:Connect(function() getgenv().LightBoost = not getgenv().LightBoost BoostBtn.Text = "Fix Lag / Light Boost: " .. (getgenv().LightBoost and "ON" or "OFF") BoostBtn.BackgroundColor3 = getgenv().LightBoost and Color3.fromRGB(40, 160, 60) or Color3.fromRGB(150, 40, 40) applyLightBoost(getgenv().LightBoost) end) AfkBtn.MouseButton1Click:Connect(function() getgenv().AntiAFK = not getgenv().AntiAFK AfkBtn.Text = "Anti-AFK: " .. (getgenv().AntiAFK and "ON" or "OFF") AfkBtn.BackgroundColor3 = getgenv().AntiAFK and Color3.fromRGB(40, 160, 60) or Color3.fromRGB(150, 40, 40) end)