-- Baldi's Basics Multiplayer ESP Script with GUI v3 -- Highlights notebooks and items (BasePart/Model, no name tags), Baldi and players (with name tags) -- Includes walkspeed control and open/close GUI -- Fixed: Buttons toggle only their category local Players = game:GetService("Players") local RunService = game:GetService("RunService") local TweenService = game:GetService("TweenService") local UserInputService = game:GetService("UserInputService") local player = Players.LocalPlayer local camera = workspace.CurrentCamera -- Configuration local CONFIG = { ESP_COLORS = { Notebook = Color3.fromRGB(255, 255, 0), -- Yellow Item = Color3.fromRGB(0, 255, 255), -- Cyan Baldi = Color3.fromRGB(255, 0, 0), -- Red Player = Color3.fromRGB(0, 255, 0) -- Green }, TRANSPARENCY = 0.5, TWEEN_TIME = 0.3, ESP_DISTANCE = 1000, -- Max distance for ESP visibility SCAN_INTERVAL = 2, -- Seconds between scans DEFAULT_WALKSPEED = 16, -- Default Roblox walkspeed MAX_WALKSPEED = 100 -- Max allowed walkspeed } -- Toggle states local toggles = { Notebooks = false, Items = false, Baldi = false, Players = false } -- Table to store ESP objects for cleanup local espObjects = {} -- Function to create ESP (Highlight only for notebooks/items, Highlight + BillboardGui for Baldi/players) local function createESP(instance, color, name, includeBillboard) if not instance or not (instance:IsA("BasePart") or instance:IsA("Model")) then return end -- Use PrimaryPart for Models, or the part itself for BaseParts local target = instance:IsA("BasePart") and instance or instance.PrimaryPart if not target then return end -- Create BillboardGui for name tag (only for Baldi/players) local billboard if includeBillboard then billboard = Instance.new("BillboardGui") billboard.Name = "ESP_" .. name billboard.Adornee = target billboard.Size = UDim2.new(0, 120, 0, 40) billboard.StudsOffset = Vector3.new(0, 3, 0) billboard.AlwaysOnTop = true billboard.MaxDistance = CONFIG.ESP_DISTANCE billboard.Parent = instance local frame = Instance.new("Frame") frame.Size = UDim2.new(1, 0, 1, 0) frame.BackgroundTransparency = 0.7 frame.BackgroundColor3 = Color3.fromRGB(0, 0, 0) frame.BorderSizePixel = 0 frame.Parent = billboard local text = Instance.new("TextLabel") text.Size = UDim2.new(1, -4, 1, -4) text.Position = UDim2.new(0, 2, 0, 2) text.BackgroundTransparency = 1 text.Text = name text.TextColor3 = color text.TextScaled = true text.Font = Enum.Font.GothamBold text.Parent = frame end -- Create Highlight for visual outline local highlight = Instance.new("Highlight") highlight.Adornee = instance highlight.FillColor = color highlight.OutlineColor = color highlight.FillTransparency = CONFIG.TRANSPARENCY highlight.OutlineTransparency = 0 highlight.Parent = instance -- Tween effect for smooth appearance local tweenInfo = TweenInfo.new(CONFIG.TWEEN_TIME, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut) local tween = TweenService:Create(highlight, tweenInfo, {FillTransparency = CONFIG.TRANSPARENCY - 0.2}) tween:Play() -- Store for cleanup if billboard then table.insert(espObjects, billboard) end table.insert(espObjects, highlight) end -- Function to check if object is within distance local function isWithinDistance(instance) if not instance or not player.Character or not player.Character:FindFirstChild("HumanoidRootPart") then return false end local targetPos = instance:IsA("BasePart") and instance.Position or instance.PrimaryPart and instance.PrimaryPart.Position if not targetPos then return false end local distance = (player.Character.HumanoidRootPart.Position - targetPos).Magnitude return distance <= CONFIG.ESP_DISTANCE end -- Function to highlight notebooks (robust detection, no name tag) local function highlightNotebooks() for _, obj in pairs(workspace:GetDescendants()) do if (obj:IsA("BasePart") or obj:IsA("Model")) then local name = obj.Name:lower() -- Broader detection: name, color, or size (notebooks are often yellow and small) local isNotebook = name:find("notebook") or name:find("book") or (obj:IsA("BasePart") and obj.BrickColor.Name:lower():find("yellow") and obj.Size.Magnitude < 5) if isNotebook and isWithinDistance(obj) then createESP(obj, CONFIG.ESP_COLORS.Notebook, "Notebook", false) end end end end -- Function to highlight items (e.g., quarters, stickers, keys, soda, no name tag) local function highlightItems() for _, obj in pairs(workspace:GetDescendants()) do if (obj:IsA("BasePart") or obj:IsA("Model")) then local name = obj.Name:lower() local isItem = name:find("quarter") or name:find("sticker") or name:find("key") or name:find("soda") or name:find("tape") or name:find("item") if isItem and isWithinDistance(obj) then createESP(obj, CONFIG.ESP_COLORS.Item, obj.Name, false) end end end end -- Function to highlight Baldi (NPC with Humanoid, with name tag) local function highlightBaldi() for _, obj in pairs(workspace:GetDescendants()) do if obj:IsA("Model") and obj:FindFirstChild("Humanoid") and obj.Name:lower():find("baldi") then if isWithinDistance(obj) then createESP(obj, CONFIG.ESP_COLORS.Baldi, "Baldi", true) end end end end -- Function to highlight players (excluding local player, with name tag) local function highlightPlayers() for _, plr in pairs(Players:GetPlayers()) do if plr ~= player and plr.Character and plr.Character:FindFirstChild("HumanoidRootPart") then if isWithinDistance(plr.Character) then createESP(plr.Character, CONFIG.ESP_COLORS.Player, plr.Name, true) end end end end -- Function to clear all ESP local function clearESP() for _, esp in pairs(espObjects) do if esp then esp:Destroy() end end espObjects = {} end -- Function to update ESP based on toggle states local function updateESP() clearESP() if toggles.Notebooks then highlightNotebooks() end if toggles.Items then highlightItems() end if toggles.Baldi then highlightBaldi() end if toggles.Players then highlightPlayers() end end -- Function to set walkspeed local function setWalkspeed(speed) if player.Character and player.Character:FindFirstChild("Humanoid") then local humanoid = player.Character.Humanoid speed = math.clamp(speed, 0, CONFIG.MAX_WALKSPEED) humanoid.WalkSpeed = speed end end -- Create GUI v3 (modern, open/close functionality, walkspeed slider) local function createGUIV3() local screenGui = Instance.new("ScreenGui") screenGui.Name = "BaldiESPGUI" screenGui.ResetOnSpawn = false screenGui.Parent = player:WaitForChild("PlayerGui") local frame = Instance.new("Frame") frame.Size = UDim2.new(0, 250, 0, 300) frame.Position = UDim2.new(0, 10, 0, 10) frame.BackgroundColor3 = Color3.fromRGB(20, 20, 20) frame.BackgroundTransparency = 0.1 frame.BorderSizePixel = 0 frame.Visible = false -- Start closed frame.Parent = screenGui local corner = Instance.new("UICorner") corner.CornerRadius = UDim.new(0, 10) corner.Parent = frame local title = Instance.new("TextLabel") title.Size = UDim2.new(1, 0, 0, 30) title.BackgroundTransparency = 1 title.Text = "Baldi's ESP v3" title.TextColor3 = Color3.fromRGB(255, 255, 255) title.TextScaled = true title.Font = Enum.Font.GothamBold title.Parent = frame local function createButton(text, position, color, toggleKey) local button = Instance.new("TextButton") button.Name = toggleKey button.Size = UDim2.new(0.45, 0, 0, 30) button.Position = position button.BackgroundColor3 = toggles[toggleKey] and color or Color3.fromRGB(80, 80, 80) button.Text = text .. (toggles[toggleKey] and " [ON]" or " [OFF]") button.TextColor3 = Color3.fromRGB(255, 255, 255) button.TextScaled = true button.Font = Enum.Font.Gotham button.BorderSizePixel = 0 button.Parent = frame local btnCorner = Instance.new("UICorner") btnCorner.CornerRadius = UDim.new(0, 6) btnCorner.Parent = button button.MouseButton1Click:Connect(function() toggles[toggleKey] = not toggles[toggleKey] button.BackgroundColor3 = toggles[toggleKey] and color or Color3.fromRGB(80, 80, 80) button.Text = text .. (toggles[toggleKey] and " [ON]" or " [OFF]") updateESP() end) return button end createButton("Notebooks", UDim2.new(0, 10, 0, 40), CONFIG.ESP_COLORS.Notebook, "Notebooks") createButton("Items", UDim2.new(0.55, -10, 0, 40), CONFIG.ESP_COLORS.Item, "Items") createButton("Baldi", UDim2.new(0, 10, 0, 80), CONFIG.ESP_COLORS.Baldi, "Baldi") createButton("Players", UDim2.new(0.55, -10, 0, 80), CONFIG.ESP_COLORS.Player, "Players") local allBtn = Instance.new("TextButton") allBtn.Size = UDim2.new(0.45, 0, 0, 30) allBtn.Position = UDim2.new(0, 10, 0, 120) allBtn.BackgroundColor3 = Color3.fromRGB(100, 100, 100) allBtn.Text = "All [OFF]" allBtn.TextColor3 = Color3.fromRGB(255, 255, 255) allBtn.TextScaled = true allBtn.Font = Enum.Font.Gotham allBtn.BorderSizePixel = 0 allBtn.Parent = frame local allCorner = Instance.new("UICorner") allCorner.CornerRadius = UDim.new(0, 6) allCorner.Parent = allBtn allBtn.MouseButton1Click:Connect(function() local allOn = not (toggles.Notebooks and toggles.Items and toggles.Baldi and toggles.Players) toggles.Notebooks = allOn toggles.Items = allOn toggles.Baldi = allOn toggles.Players = allOn for _, btn in pairs(frame:GetChildren()) do if btn:IsA("TextButton") and btn ~= allBtn then local key = btn.Name if CONFIG.ESP_COLORS[key] then btn.BackgroundColor3 = allOn and CONFIG.ESP_COLORS[key] or Color3.fromRGB(80, 80, 80) btn.Text = btn.Text:match("^[^%[]+") .. (allOn and " [ON]" or " [OFF]") end end end allBtn.Text = "All " .. (allOn and "[ON]" or " [OFF]") allBtn.BackgroundColor3 = allOn and Color3.fromRGB(150, 150, 150) or Color3.fromRGB(100, 100, 100) updateESP() end) local offBtn = Instance.new("TextButton") offBtn.Size = UDim2.new(0.45, 0, 0, 30) offBtn.Position = UDim2.new(0.55, -10, 0, 120) offBtn.BackgroundColor3 = Color3.fromRGB(200, 0, 0) offBtn.Text = "Turn Off" offBtn.TextColor3 = Color3.fromRGB(255, 255, 255) offBtn.TextScaled = true offBtn.Font = Enum.Font.Gotham offBtn.BorderSizePixel = 0 offBtn.Parent = frame local offCorner = Instance.new("UICorner") offCorner.CornerRadius = UDim.new(0, 6) offCorner.Parent = offBtn offBtn.MouseButton1Click:Connect(function() toggles.Notebooks = false toggles.Items = false toggles.Baldi = false toggles.Players = false for _, btn in pairs(frame:GetChildren()) do if btn:IsA("TextButton") and btn ~= offBtn and btn ~= allBtn then btn.BackgroundColor3 = Color3.fromRGB(80, 80, 80) btn.Text = btn.Text:match("^[^%[]+") .. " [OFF]" end end allBtn.BackgroundColor3 = Color3.fromRGB(100, 100, 100) allBtn.Text = "All [OFF]" clearESP() end) -- Walkspeed Control local wsLabel = Instance.new("TextLabel") wsLabel.Size = UDim2.new(1, 0, 0, 30) wsLabel.Position = UDim2.new(0, 0, 0, 160) wsLabel.BackgroundTransparency = 1 wsLabel.Text = "Walkspeed: " .. CONFIG.DEFAULT_WALKSPEED wsLabel.TextColor3 = Color3.fromRGB(255, 255, 255) wsLabel.TextScaled = true wsLabel.Font = Enum.Font.Gotham wsLabel.Parent = frame local wsInput = Instance.new("TextBox") wsInput.Size = UDim2.new(0.45, 0, 0, 30) wsInput.Position = UDim2.new(0, 10, 0, 200) wsInput.BackgroundColor3 = Color3.fromRGB(50, 50, 50) wsInput.Text = tostring(CONFIG.DEFAULT_WALKSPEED) wsInput.TextColor3 = Color3.fromRGB(255, 255, 255) wsInput.TextScaled = true wsInput.Font = Enum.Font.Gotham wsInput.Parent = frame local wsCorner = Instance.new("UICorner") wsCorner.CornerRadius = UDim.new(0, 6) wsCorner.Parent = wsInput wsInput.FocusLost:Connect(function() local speed = tonumber(wsInput.Text) if speed then setWalkspeed(speed) wsLabel.Text = "Walkspeed: " .. speed else wsInput.Text = tostring(player.Character and player.Character.Humanoid.WalkSpeed or CONFIG.DEFAULT_WALKSPEED) end end) local wsReset = Instance.new("TextButton") wsReset.Size = UDim2.new(0.45, 0, 0, 30) wsReset.Position = UDim2.new(0.55, -10, 0, 200) wsReset.BackgroundColor3 = Color3.fromRGB(100, 100, 100) wsReset.Text = "Reset Walkspeed" wsReset.TextColor3 = Color3.fromRGB(255, 255, 255) wsReset.TextScaled = true wsReset.Font = Enum.Font.Gotham wsReset.Parent = frame local resetCorner = Instance.new("UICorner") resetCorner.CornerRadius = UDim.new(0, 6) resetCorner.Parent = wsReset wsReset.MouseButton1Click:Connect(function() setWalkspeed(CONFIG.DEFAULT_WALKSPEED) wsInput.Text = tostring(CONFIG.DEFAULT_WALKSPEED) wsLabel.Text = "Walkspeed: " .. CONFIG.DEFAULT_WALKSPEED end) -- Open/Close Button (outside main frame) local openCloseBtn = Instance.new("TextButton") openCloseBtn.Size = UDim2.new(0, 50, 0, 50) openCloseBtn.Position = UDim2.new(0, 10, 0, 10) openCloseBtn.BackgroundColor3 = Color3.fromRGB(50, 50, 50) openCloseBtn.Text = "Open" openCloseBtn.TextColor3 = Color3.fromRGB(255, 255, 255) openCloseBtn.TextScaled = true openCloseBtn.Font = Enum.Font.GothamBold openCloseBtn.Parent = screenGui local ocCorner = Instance.new("UICorner") ocCorner.CornerRadius = UDim.new(0, 25) ocCorner.Parent = openCloseBtn openCloseBtn.MouseButton1Click:Connect(function() frame.Visible = not frame.Visible openCloseBtn.Text = frame.Visible and "Close" or "Open" end) end -- Initialize clearESP() createGUIV3() -- Update ESP on character spawn player.CharacterAdded:Connect(function() wait(1) updateESP() if player.Character and player.Character:FindFirstChild("Humanoid") then player.Character.Humanoid.WalkSpeed = CONFIG.DEFAULT_WALKSPEED end end) -- Continuous scan for new objects, respecting toggle states spawn(function() while true do wait(CONFIG.SCAN_INTERVAL) updateESP() end end) -- Handle new players joining Players.PlayerAdded:Connect(function() wait(1) if toggles.Players then highlightPlayers() end end) print("Baldi's ESP v3 Loaded Successfully! Press 'Open' button in top-left corner.")