local Players = game:GetService("Players") local RunService = game:GetService("RunService") local LocalPlayer = Players.LocalPlayer local Camera = workspace.CurrentCamera local ESP = { Enabled = true, BeamEnabled = true, TeamCheck = false, MaxDistance = 1500, Box = { Color = Color3.fromRGB(255, 0, 0), Thickness = 1.5, }, Tracer = { Color = Color3.fromRGB(255, 0, 0), Thickness = 1.2, }, Name = { Color = Color3.fromRGB(255, 255, 255), Size = 13, } } local ScreenGui = Instance.new("ScreenGui") ScreenGui.Name = "Custom_ESP_Menu" ScreenGui.Parent = LocalPlayer:WaitForChild("PlayerGui") ScreenGui.ResetOnSpawn = false local MainFrame = Instance.new("Frame") MainFrame.Size = UDim2.new(0, 110, 0, 85) MainFrame.Position = UDim2.new(0, 15, 0.12, 0) MainFrame.BackgroundColor3 = Color3.fromRGB(25, 25, 25) MainFrame.BorderSizePixel = 0 MainFrame.Parent = ScreenGui local Corner = Instance.new("UICorner") Corner.CornerRadius = UDim.new(0, 8) Corner.Parent = MainFrame local UIListLayout = Instance.new("UIListLayout") UIListLayout.Parent = MainFrame UIListLayout.Padding = UDim.new(0, 6) UIListLayout.HorizontalAlignment = Enum.HorizontalAlignment.Center UIListLayout.VerticalAlignment = Enum.VerticalAlignment.Center local function CreateButton(text, toggleTable, toggleVar) local Btn = Instance.new("TextButton") Btn.Size = UDim2.new(0, 95, 0, 32) Btn.BackgroundColor3 = toggleTable[toggleVar] and Color3.fromRGB(50, 150, 50) or Color3.fromRGB(150, 50, 50) Btn.Text = text .. ": " .. (toggleTable[toggleVar] and "ON" or "OFF") Btn.TextColor3 = Color3.new(1, 1, 1) Btn.Font = Enum.Font.GothamBold Btn.TextSize = 11 Btn.AutoButtonColor = false Btn.BorderSizePixel = 0 Btn.Parent = MainFrame local BtnCorner = Instance.new("UICorner") BtnCorner.CornerRadius = UDim.new(0, 4) BtnCorner.Parent = Btn Btn.MouseButton1Click:Connect(function() toggleTable[toggleVar] = not toggleTable[toggleVar] Btn.Text = text .. ": " .. (toggleTable[toggleVar] and "ON" or "OFF") Btn.BackgroundColor3 = toggleTable[toggleVar] and Color3.fromRGB(50, 150, 50) or Color3.fromRGB(150, 50, 50) end) end CreateButton("ESP BOX", ESP, "Enabled") CreateButton("RED BEAM", ESP, "BeamEnabled") local ESPObjects = {} local function CreateDrawing(type, properties) local drawing = Drawing.new(type) for prop, value in pairs(properties) do drawing[prop] = value end return drawing end local function CreateESP(Player) local Drawings = { Box = CreateDrawing("Square", {Visible = false, Color = ESP.Box.Color, Thickness = ESP.Box.Thickness, Filled = false}), Tracer = CreateDrawing("Line", {Visible = false, Color = ESP.Tracer.Color, Thickness = ESP.Tracer.Thickness}), Name = CreateDrawing("Text", {Visible = false, Color = ESP.Name.Color, Size = ESP.Name.Size, Center = true, Outline = true}), HealthBarOutline = CreateDrawing("Square", {Visible = false, Color = Color3.new(0,0,0), Thickness = 1, Filled = true}), HealthBar = CreateDrawing("Square", {Visible = false, Color = Color3.new(0,1,0), Thickness = 1, Filled = true}) } ESPObjects[Player] = Drawings end local function UpdatePlayerESP(Player, Drawings) local char = Player.Character local hum = char and char:FindFirstChild("Humanoid") local root = char and char:FindFirstChild("HumanoidRootPart") if not (char and hum and root) or (ESP.TeamCheck and Player.Team == LocalPlayer.Team) then for _, d in pairs(Drawings) do d.Visible = false end return end local pos, onScreen = Camera:WorldToViewportPoint(root.Position) if not onScreen then for _, d in pairs(Drawings) do d.Visible = false end return end local distance = (Camera.CFrame.Position - root.Position).Magnitude if distance > ESP.MaxDistance then for _, d in pairs(Drawings) do d.Visible = false end return end local boxSize = Vector2.new(2000 / pos.Z, 3000 / pos.Z) local boxPos = Vector2.new(pos.X - boxSize.X / 2, pos.Y - boxSize.Y / 2) local showESP = ESP.Enabled Drawings.Box.Visible = showESP Drawings.Box.Size = boxSize Drawings.Box.Position = boxPos Drawings.Name.Visible = showESP Drawings.Name.Text = string.format("%s [%dm]", Player.Name, math.floor(distance)) Drawings.Name.Position = Vector2.new(pos.X, boxPos.Y - 15) local healthPct = math.clamp(hum.Health / hum.MaxHealth, 0, 1) Drawings.HealthBarOutline.Visible = showESP Drawings.HealthBarOutline.Size = Vector2.new(4, boxSize.Y) Drawings.HealthBarOutline.Position = Vector2.new(boxPos.X - 6, boxPos.Y) Drawings.HealthBar.Visible = showESP Drawings.HealthBar.Size = Vector2.new(2, boxSize.Y * healthPct) Drawings.HealthBar.Position = Vector2.new(boxPos.X - 5, boxPos.Y + boxSize.Y - Drawings.HealthBar.Size.Y) Drawings.HealthBar.Color = Color3.new(1, 0, 0):Lerp(Color3.new(0, 1, 0), healthPct) Drawings.Tracer.Visible = ESP.BeamEnabled Drawings.Tracer.From = Vector2.new(Camera.ViewportSize.X / 2, 0) Drawings.Tracer.To = Vector2.new(pos.X, pos.Y) end RunService.RenderStepped:Connect(function() for Player, Drawings in pairs(ESPObjects) do if Player.Parent then UpdatePlayerESP(Player, Drawings) else for _, d in pairs(Drawings) do d:Remove() end ESPObjects[Player] = nil end end end) Players.PlayerAdded:Connect(CreateESP) Players.PlayerRemoving:Connect(function(p) if ESPObjects[p] then for _, d in pairs(ESPObjects[p]) do d:Remove() end ESPObjects[p] = nil end end) for _, p in pairs(Players:GetPlayers()) do if p ~= LocalPlayer then CreateESP(p) end end