-- Create ScreenGui local screenGui = Instance.new("ScreenGui") screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui") -- Create Main Frame (transparent black with rounded corners) local mainFrame = Instance.new("Frame") mainFrame.Size = UDim2.new(0, 300, 0, 200) mainFrame.Position = UDim2.new(0.5, -150, 0.4, -100) mainFrame.BackgroundColor3 = Color3.fromRGB(0, 0, 0) -- Black mainFrame.BackgroundTransparency = 0.5 -- 50% transparency mainFrame.BorderSizePixel = 0 mainFrame.Parent = screenGui local mainFrameCorner = Instance.new("UICorner") mainFrameCorner.CornerRadius = UDim.new(0, 15) -- Rounded corners for the main frame mainFrameCorner.Parent = mainFrame -- Create Header Zone (transparent grey with rounded corners, draggable) local headerZone = Instance.new("Frame") headerZone.Size = UDim2.new(1, 0, 0, 40) headerZone.Position = UDim2.new(0, 0, 0, 0) headerZone.BackgroundColor3 = Color3.fromRGB(50, 50, 50) -- Grey headerZone.BackgroundTransparency = 0.3 -- Slight transparency headerZone.BorderSizePixel = 0 headerZone.Parent = mainFrame local headerCorner = Instance.new("UICorner") headerCorner.CornerRadius = UDim.new(0, 15) -- Rounded corners for the header headerCorner.Parent = headerZone -- Enable Dragging for the Header Zone local dragging = false local dragStart, startPos headerZone.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 then dragging = true dragStart = input.Position startPos = mainFrame.Position end end) headerZone.InputEnded:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 then dragging = false end end) headerZone.InputChanged:Connect(function(input) if dragging and input.UserInputType == Enum.UserInputType.MouseMovement then local delta = input.Position - dragStart mainFrame.Position = UDim2.new( startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y ) end end) -- Create Button for ESP NPCs local npcButton = Instance.new("TextButton") npcButton.Size = UDim2.new(0, 250, 0, 50) npcButton.Position = UDim2.new(0.5, -125, 0.4, 0) npcButton.BackgroundColor3 = Color3.fromRGB(0, 162, 232) -- Light blue npcButton.BackgroundTransparency = 0.3 -- Transparent button npcButton.BorderSizePixel = 0 npcButton.Text = "ESP NPCs" npcButton.TextColor3 = Color3.fromRGB(255, 255, 255) -- White npcButton.Font = Enum.Font.GothamBold npcButton.TextSize = 16 npcButton.Parent = mainFrame local npcButtonCorner = Instance.new("UICorner") npcButtonCorner.CornerRadius = UDim.new(0, 15) -- Rounded edges for NPC button npcButtonCorner.Parent = npcButton -- Create Button for ESP Sheriffs local sheriffButton = Instance.new("TextButton") sheriffButton.Size = UDim2.new(0, 250, 0, 50) sheriffButton.Position = UDim2.new(0.5, -125, 0.7, 0) sheriffButton.BackgroundColor3 = Color3.fromRGB(255, 85, 85) -- Light red sheriffButton.BackgroundTransparency = 0.3 -- Transparent button sheriffButton.BorderSizePixel = 0 sheriffButton.Text = "ESP Sheriffs" sheriffButton.TextColor3 = Color3.fromRGB(255, 255, 255) -- White sheriffButton.Font = Enum.Font.GothamBold sheriffButton.TextSize = 16 sheriffButton.Parent = mainFrame local sheriffButtonCorner = Instance.new("UICorner") sheriffButtonCorner.CornerRadius = UDim.new(0, 15) -- Rounded edges for Sheriff button sheriffButtonCorner.Parent = sheriffButton -- ESP Variables local npcEspEnabled = false local sheriffEspEnabled = false -- Highlight Function local function createHighlight(model, color) if not model:FindFirstChildOfClass("Highlight") then local highlight = Instance.new("Highlight") highlight.Parent = model highlight.DepthMode = Enum.HighlightDepthMode.AlwaysOnTop highlight.FillColor = color highlight.FillTransparency = 0.5 highlight.OutlineColor = Color3.new(1, 1, 1) -- White outline highlight.OutlineTransparency = 0 end end -- Remove Highlight Function local function removeHighlight(model) for _, child in pairs(model:GetChildren()) do if child:IsA("Highlight") then child:Destroy() end end end -- Toggle ESP for NPCs local function toggleNPCESP() npcEspEnabled = not npcEspEnabled if npcEspEnabled then npcButton.Text = "Disable NPC ESP" for _, object in pairs(workspace:GetDescendants()) do if object:IsA("Model") and object:GetAttribute("LivesGiven") then createHighlight(object, Color3.new(0, 1, 0)) -- Green for NPCs end end else npcButton.Text = "ESP NPCs" for _, object in pairs(workspace:GetDescendants()) do if object:IsA("Model") and object:GetAttribute("LivesGiven") then removeHighlight(object) end end end end -- Toggle ESP for Sheriffs local function toggleSheriffESP() sheriffEspEnabled = not sheriffEspEnabled if sheriffEspEnabled then sheriffButton.Text = "Disable Sheriff ESP" for _, object in pairs(workspace:GetDescendants()) do if object:IsA("Model") and object:GetAttribute("LivesGiven") then createHighlight(object, Color3.new(1, 0, 0)) -- Strictly Red for Sheriffs end end else sheriffButton.Text = "ESP Sheriffs" for _, object in pairs(workspace:GetDescendants()) do if object:IsA("Model") and object:GetAttribute("LivesGiven") then removeHighlight(object) end end end end -- Button Connections npcButton.MouseButton1Click:Connect(toggleNPCESP) sheriffButton.MouseButton1Click:Connect(toggleSheriffESP)