-- [[ Rscripts Risk Notice ]] -- This script is not verified by rscripts.net. Deal with caution. -- -- Stay safe: -- • Never log in on unofficial Roblox sites or lookalike domains. -- • Real Roblox links use roblox.com (check the .com ending). -- • Treat fake Roblox login / "claim reward" pages as phishing. -- [[ End Rscripts Risk Notice ]] -- DeepHat Final: Players Only ESP -- Focus: Strict Player Targeting & Aggressive Toggle local plrs = game:GetService("Players") local rs = game:GetService("RunService") local uis = game:GetService("UserInputService") local lp = plrs.LocalPlayer local target_container = (gethui and gethui()) or game:GetService("CoreGui") -- [1. SETTINGS] local Settings = { color = Color3.fromRGB(255, 50, 50), outline = Color3.fromRGB(0, 0, 0), team_check = true, enabled = false, -- Master Switch gui_visible = true } -- [2. GUI SETUP] local ScreenGui = Instance.new("ScreenGui") ScreenGui.Name = "DeepHat_Player_ESP" ScreenGui.Parent = target_container local MainButton = Instance.new("TextButton") MainButton.Size = UDim2.new(0, 150, 0, 50) MainButton.Position = UDim2.new(0.5, -75, 0.1, 0) MainButton.BackgroundColor3 = Color3.fromRGB(200, 50, 50) MainButton.Text = "ESP: OFF" MainButton.TextColor3 = Color3.new(1, 1, 1) MainButton.Font = Enum.Font.SourceSansBold MainButton.TextSize = 20 MainButton.BorderSizePixel = 2 MainButton.Parent = ScreenGui MainButton.Active = true MainButton.Draggable = true -- [3. TOGGLE LOGIC] MainButton.MouseButton1Click:Connect(function() Settings.enabled = not Settings.enabled if Settings.enabled then MainButton.Text = "ESP: ON" MainButton.BackgroundColor3 = Color3.fromRGB(50, 200, 50) else MainButton.Text = "ESP: OFF" MainButton.BackgroundColor3 = Color3.fromRGB(200, 50, 50) -- Aggressive Cleanup: Wipe all ESP tags for _, v in pairs(plrs:GetPlayers()) do local tag = "hx_p_" .. v.UserId local existing = target_container:FindFirstChild(tag) if existing then existing:Destroy() end end end end) -- [4. HIDE INTERFACE (K)] uis.InputBegan:Connect(function(input, processed) if not processed and input.KeyCode == Enum.KeyCode.K then Settings.gui_visible = not Settings.gui_visible ScreenGui.Enabled = Settings.gui_visible end end) -- [5. CORE LOGIC] local function get_color(v) -- Only return team color if team check is on and they aren't on your team if Settings.team_check and v.Team and v.Team ~= lp.Team then return v.Team.TeamColor.Color end return Settings.color end local function apply_esp(v) -- Strict Player Check if not v:IsA("Player") or v == lp then return end if not v.Character or not v.Character:FindFirstChild("HumanoidRootPart") then return end -- Team Check if Settings.team_check and v.Team == lp.Team then return end local char = v.Character local tag = "hx_p_" .. v.UserId -- Unique tag for players if target_container:FindFirstChild(tag) then return end local h = Instance.new("Highlight") h.Name = tag h.Adornee = char h.FillColor = get_color(v) h.OutlineColor = Settings.outline h.FillTransparency = 0.45 h.OutlineTransparency = 0 h.DepthMode = Enum.HighlightDepthMode.AlwaysOnTop h.Parent = target_container end -- [6. MAIN UPDATE LOOP] rs.RenderStepped:Connect(function() if not Settings.enabled then return end for _, v in pairs(plrs:GetPlayers()) do -- Only target other players if v ~= lp then local tag = "hx_p_" .. v.UserId local existing = target_container:FindFirstChild(tag) -- If player exists and has a character, update/apply ESP if v.Character and v.Character:FindFirstChild("HumanoidRootPart") then -- Check if they should be visible (Team Check) local shouldShow = true if Settings.team_check and v.Team == lp.Team then shouldShow = false end if shouldShow then if not existing then apply_esp(v) else -- Update color in case of team changes or settings changes existing.FillColor = get_color(v) end else -- If they should be hidden (teammate), destroy the highlight if existing then existing:Destroy() end end else -- If character is gone, remove highlight if existing then existing:Destroy() end end end end end) -- Cleanup when player leaves plrs.PlayerRemoving:Connect(function(v) local tag = "hx_p_" .. v.UserId local existing = target_container:FindFirstChild(tag) if existing then existing:Destroy() end end) print("DeepHat Player-Only ESP Loaded.")