-- Project Delta GUI Framework (Tabbed ESP, Aimbot & Player System - Decoupled Distance) local Players = game:GetService("Players") local LocalPlayer = Players.LocalPlayer local CoreGui = game:GetService("CoreGui") local UserInputService = game:GetService("UserInputService") local RunService = game:GetService("RunService") local Lighting = game:GetService("Lighting") local Camera = game:GetService("Workspace").CurrentCamera local Mouse = LocalPlayer:GetMouse() -- Feature Configurations (Global Variables) _G.CurrentTab = "ESP" _G.MainESP_Enabled = false _G.Names_Enabled = true _G.Health_Enabled = true _G.Distance_Enabled = true _G.Skeleton_Enabled = true _G.Chams_Enabled = true -- Aimbot Configuration States _G.Aim_Enabled = false _G.Aim_FOV = 100 _G.Aim_Smoothness = 4 _G.Aim_Key = Enum.UserInputType.MouseButton2 -- Default: Right Mouse Button _G.Aim_Keybind_String = "RMB" -- Для отображения в интерфейсе _G.Aim_WallCheck = false -- Player Configuration States _G.Fullbright_Enabled = false -- Backup Lighting Data for Restoration Routine local OriginalAmbient = Lighting.Ambient local OriginalOutdoorAmbient = Lighting.OutdoorAmbient local OriginalBrightness = Lighting.Brightness local OriginalClockTime = Lighting.ClockTime -- Garbage Collection Execution Block if _G.DeltaConnections then for _, conn in pairs(_G.DeltaConnections) do if conn then conn:Disconnect() end end end _G.DeltaConnections = {} if _G.DeltaESP_Objects then for _, obj in pairs(_G.DeltaESP_Objects) do if obj.Name then obj.Name:Remove() end if obj.Health then obj.Health:Remove() end if obj.Distance then obj.Distance:Remove() end if obj.Cham then obj.Cham:Destroy() end if obj.Bones then for _, line in pairs(obj.Bones) do line:Remove() end end end end _G.DeltaESP_Objects = {} if _G.DeltaFOV_Circle then _G.DeltaFOV_Circle:Remove() end -- Render FOV Circle Object via Drawing Library local FOVCircle = Drawing.new("Circle") FOVCircle.Thickness = 1 FOVCircle.Color = Color3.fromRGB(255, 255, 255) FOVCircle.Filled = false FOVCircle.Transparency = 0.7 _G.DeltaFOV_Circle = FOVCircle -- Main Control GUI Frame local ScreenGui = Instance.new("ScreenGui") ScreenGui.Name = "DeltaMenu" ScreenGui.Parent = CoreGui ScreenGui.ResetOnSpawn = false local MainFrame = Instance.new("Frame") MainFrame.Name = "MainFrame" MainFrame.Size = UDim2.new(0, 380, 0, 470) -- Увеличили высоту для кнопки бинда MainFrame.Position = UDim2.new(0.5, -190, 0.5, -235) MainFrame.BackgroundColor3 = Color3.fromRGB(30, 30, 30) MainFrame.BorderSizePixel = 0 MainFrame.Active = true MainFrame.Parent = ScreenGui local UICorner = Instance.new("UICorner") UICorner.CornerRadius = UDim.new(0, 8) UICorner.Parent = MainFrame -- Tab Control Header Container local TabHeader = Instance.new("Frame") TabHeader.Size = UDim2.new(1, -30, 0, 40) TabHeader.Position = UDim2.new(0, 30, 0, 0) TabHeader.BackgroundColor3 = Color3.fromRGB(40, 40, 40) TabHeader.BorderSizePixel = 0 TabHeader.Parent = MainFrame local THCorner = Instance.new("UICorner") THCorner.CornerRadius = UDim.new(0, 8) THCorner.Parent = TabHeader -- Dedicated Small Arrow Drag Handle (Top-Left Corner) local DragHandle = Instance.new("TextLabel") DragHandle.Name = "DragHandle" DragHandle.Size = UDim2.new(0, 30, 0, 40) DragHandle.Position = UDim2.new(0, 0, 0, 0) DragHandle.BackgroundColor3 = Color3.fromRGB(45, 45, 45) DragHandle.BorderSizePixel = 0 DragHandle.Text = "⬈" DragHandle.TextColor3 = Color3.fromRGB(0, 180, 100) DragHandle.TextSize = 16 DragHandle.Font = Enum.Font.SourceSansBold DragHandle.Active = true DragHandle.Parent = MainFrame local DHCorner = Instance.new("UICorner") DHCorner.CornerRadius = UDim.new(0, 8) DHCorner.Parent = DragHandle -- Header Grab/Drag Logic Implementation tied exclusively to DragHandle local Dragging = false local DragInput, DragStart, StartPosition local function UpdateDrag(input) local Delta = input.Position - DragStart MainFrame.Position = UDim2.new(StartPosition.X.Scale, StartPosition.X.Offset + Delta.X, StartPosition.Y.Scale, StartPosition.Y.Offset + Delta.Y) end local HandleInputBegan = DragHandle.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then Dragging = true DragStart = input.Position StartPosition = MainFrame.Position local ChangedConn ChangedConn = input.Changed:Connect(function() if input.UserInputState == Enum.UserInputState.End then Dragging = false ChangedConn:Disconnect() end end) end end) table.insert(_G.DeltaConnections, HandleInputBegan) local HandleInputChanged = DragHandle.InputChanged:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then DragInput = input end end) table.insert(_G.DeltaConnections, HandleInputChanged) local ContainerInputChanged = UserInputService.InputChanged:Connect(function(input) if input == DragInput and Dragging then UpdateDrag(input) end end) table.insert(_G.DeltaConnections, ContainerInputChanged) -- Tab Activation Containers local ESPTabFrame = Instance.new("Frame") ESPTabFrame.Size = UDim2.new(1, 0, 1, -40) ESPTabFrame.Position = UDim2.new(0, 0, 0, 40) ESPTabFrame.BackgroundTransparency = 1 ESPTabFrame.Parent = MainFrame local AimTabFrame = Instance.new("Frame") AimTabFrame.Size = UDim2.new(1, 0, 1, -40) AimTabFrame.Position = UDim2.new(0, 0, 0, 40) AimTabFrame.BackgroundTransparency = 1 AimTabFrame.Visible = false AimTabFrame.Parent = MainFrame local PlayerTabFrame = Instance.new("Frame") PlayerTabFrame.Size = UDim2.new(1, 0, 1, -40) PlayerTabFrame.Position = UDim2.new(0, 0, 0, 40) PlayerTabFrame.BackgroundTransparency = 1 PlayerTabFrame.Visible = false PlayerTabFrame.Parent = MainFrame local ESP_SubContainer = Instance.new("Frame") ESP_SubContainer.Size = UDim2.new(1, 0, 1, -110) ESP_SubContainer.Position = UDim2.new(0, 0, 0, 70) ESP_SubContainer.BackgroundTransparency = 1 ESP_SubContainer.Visible = false ESP_SubContainer.Parent = ESPTabFrame -- Interface Navigation Logic switcher local function SwitchTab(tabName) _G.CurrentTab = tabName ESPTabFrame.Visible = (tabName == "ESP") AimTabFrame.Visible = (tabName == "AIM") PlayerTabFrame.Visible = (tabName == "PLAYER") end local function CreateTabButton(text, position, tabTarget) local Btn = Instance.new("TextButton") Btn.Size = UDim2.new(0, 110, 1, 0) Btn.Position = position Btn.BackgroundTransparency = 1 Btn.Text = text Btn.TextColor3 = Color3.fromRGB(255, 255, 255) Btn.Font = Enum.Font.SourceSansBold Btn.TextSize = 13 Btn.Parent = TabHeader Btn.MouseButton1Click:Connect(function() SwitchTab(tabTarget) end) end CreateTabButton("Visuals (ESP)", UDim2.new(0, 5, 0, 0), "ESP") CreateTabButton("Targeting (AIM)", UDim2.new(0, 120, 0, 0), "AIM") CreateTabButton("Player (MISC)", UDim2.new(0, 235, 0, 0), "PLAYER") -- Universal Re-usable Control Module Creator Functions local function CreateToggleButton(name, position, global_flag, parent) local Button = Instance.new("TextButton") Button.Size = UDim2.new(0, 340, 0, 32) Button.Position = position Button.BackgroundColor3 = _G[global_flag] and Color3.fromRGB(0, 180, 100) or Color3.fromRGB(180, 50, 50) Button.Text = name .. (_G[global_flag] and ": ON" or ": OFF") Button.TextColor3 = Color3.fromRGB(255, 255, 255) Button.TextSize = 13 Button.Font = Enum.Font.SourceSansSemibold Button.Parent = parent local BCorner = Instance.new("UICorner") BCorner.CornerRadius = UDim.new(0, 6) BCorner.Parent = Button Button.MouseButton1Click:Connect(function() _G[global_flag] = not _G[global_flag] Button.BackgroundColor3 = _G[global_flag] and Color3.fromRGB(0, 180, 100) or Color3.fromRGB(180, 50, 50) Button.Text = name .. (_G[global_flag] and ": ON" or ": OFF") end) return Button end local function CreateSlider(name, position, min, max, default, global_flag, parent) local SliderFrame = Instance.new("Frame") SliderFrame.Size = UDim2.new(0, 340, 0, 45) SliderFrame.Position = position SliderFrame.BackgroundTransparency = 1 SliderFrame.Parent = parent local Label = Instance.new("TextLabel") Label.Size = UDim2.new(1, 0, 0, 20) Label.BackgroundTransparency = 1 Label.Text = name .. ": " .. tostring(default) Label.TextColor3 = Color3.fromRGB(200, 200, 200) Label.TextSize = 12 Label.Font = Enum.Font.SourceSans Label.TextXAlignment = Enum.TextXAlignment.Left Label.Parent = SliderFrame local Rail = Instance.new("Frame") Rail.Size = UDim2.new(1, 0, 0, 6) Rail.Position = UDim2.new(0, 0, 0, 25) Rail.BackgroundColor3 = Color3.fromRGB(60, 60, 60) Rail.BorderSizePixel = 0 Rail.Parent = SliderFrame local Knob = Instance.new("Frame") Knob.Size = UDim2.new(0, 12, 0, 12) Knob.Position = UDim2.new((default - min) / (max - min), -6, 0.5, -6) Knob.BackgroundColor3 = Color3.fromRGB(0, 180, 100) Knob.BorderSizePixel = 0 Knob.Parent = Rail local IsDragging = false Knob.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 then IsDragging = true end end) UserInputService.InputEnded:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 then IsDragging = false end end) local DragConn = UserInputService.InputChanged:Connect(function(input) if IsDragging and input.UserInputType == Enum.UserInputType.MouseMovement then local RelativeX = math.clamp((input.Position.X - Rail.AbsolutePosition.X) / Rail.AbsoluteSize.X, 0, 1) Knob.Position = UDim2.new(RelativeX, -6, 0.5, -6) local Value = math.floor(min + (RelativeX * (max - min))) _G[global_flag] = Value Label.Text = name .. ": " .. tostring(Value) end end) table.insert(_G.DeltaConnections, DragConn) end -- Функция для создания кнопки бинда с полной поддержкой мыши local function CreateBindButton(name, position, global_key_flag, global_display_flag, parent) local Button = Instance.new("TextButton") Button.Size = UDim2.new(0, 340, 0, 32) Button.Position = position Button.BackgroundColor3 = Color3.fromRGB(60, 60, 150) Button.Text = name .. ": " .. _G[global_display_flag] Button.TextColor3 = Color3.fromRGB(255, 255, 255) Button.TextSize = 13 Button.Font = Enum.Font.SourceSansSemibold Button.Parent = parent local BCorner = Instance.new("UICorner") BCorner.CornerRadius = UDim.new(0, 6) BCorner.Parent = Button local isWaitingForBind = false -- Функция для преобразования типа ввода в читаемое название local function GetInputDisplayName(input) if input.UserInputType == Enum.UserInputType.Keyboard then if input.KeyCode ~= Enum.KeyCode.Unknown then return input.KeyCode.Name end elseif input.UserInputType == Enum.UserInputType.MouseButton1 then return "LMB" elseif input.UserInputType == Enum.UserInputType.MouseButton2 then return "RMB" elseif input.UserInputType == Enum.UserInputType.MouseButton3 then return "MMB" elseif input.UserInputType == Enum.UserInputType.MouseWheel then return "MWHEEL" elseif input.UserInputType == Enum.UserInputType.MouseButton4 then return "X1" -- Дополнительная кнопка мыши elseif input.UserInputType == Enum.UserInputType.MouseButton5 then return "X2" -- Дополнительная кнопка мыши elseif input.UserInputType == Enum.UserInputType.MouseButton6 then return "X3" elseif input.UserInputType == Enum.UserInputType.MouseButton7 then return "X4" end return "UNKNOWN" end Button.MouseButton1Click:Connect(function() if isWaitingForBind then return end isWaitingForBind = true Button.BackgroundColor3 = Color3.fromRGB(200, 50, 50) Button.Text = "Press any key/button..." local bindConn bindConn = UserInputService.InputBegan:Connect(function(input, processed) if not processed and isWaitingForBind then -- Определяем тип ввода и сохраняем local inputType = input.UserInputType local keyCode = input.KeyCode -- Проверяем, что это валидный ввод if inputType == Enum.UserInputType.Keyboard and keyCode ~= Enum.KeyCode.Unknown then _G[global_key_flag] = keyCode _G[global_display_flag] = keyCode.Name elseif inputType == Enum.UserInputType.MouseButton1 or inputType == Enum.UserInputType.MouseButton2 or inputType == Enum.UserInputType.MouseButton3 or inputType == Enum.UserInputType.MouseButton4 or inputType == Enum.UserInputType.MouseButton5 or inputType == Enum.UserInputType.MouseButton6 or inputType == Enum.UserInputType.MouseButton7 or inputType == Enum.UserInputType.MouseWheel then _G[global_key_flag] = inputType _G[global_display_flag] = GetInputDisplayName(input) else -- Игнорируем другие типы ввода (тач, джойстик и т.д.) return end -- Обновляем текст кнопки Button.Text = name .. ": " .. _G[global_display_flag] Button.BackgroundColor3 = Color3.fromRGB(60, 60, 150) isWaitingForBind = false if bindConn then bindConn:Disconnect() end end end) -- Таймаут на случай, если пользователь не нажмет клавишу task.delay(5, function() if isWaitingForBind then isWaitingForBind = false Button.BackgroundColor3 = Color3.fromRGB(60, 60, 150) Button.Text = name .. ": " .. _G[global_display_flag] if bindConn then bindConn:Disconnect() end end end) end) return Button end local function UpdateESPLayout() if _G.MainESP_Enabled then ESP_SubContainer.Visible = true else ESP_SubContainer.Visible = false end end -- Assemble Visuals Section local MasterESP = CreateToggleButton("Master ESP", UDim2.new(0, 20, 0, 15), "MainESP_Enabled", ESPTabFrame) MasterESP.MouseButton1Click:Connect(UpdateESPLayout) CreateToggleButton("Show Names", UDim2.new(0, 20, 0, 0), "Names_Enabled", ESP_SubContainer) CreateToggleButton("Show Health", UDim2.new(0, 20, 0, 40), "Health_Enabled", ESP_SubContainer) CreateToggleButton("Show Distance", UDim2.new(0, 20, 0, 80), "Distance_Enabled", ESP_SubContainer) CreateToggleButton("Show Skeleton", UDim2.new(0, 20, 0, 120), "Skeleton_Enabled", ESP_SubContainer) CreateToggleButton("Show Chams", UDim2.new(0, 20, 0, 160), "Chams_Enabled", ESP_SubContainer) -- Assemble Aim Section CreateToggleButton("Master Aimbot", UDim2.new(0, 20, 0, 15), "Aim_Enabled", AimTabFrame) CreateToggleButton("Wall Check Visibility", UDim2.new(0, 20, 0, 55), "Aim_WallCheck", AimTabFrame) CreateSlider("Aimbot Radius FOV", UDim2.new(0, 20, 0, 100), 30, 300, 100, "Aim_FOV", AimTabFrame) CreateSlider("Lock Smoothness", UDim2.new(0, 20, 0, 155), 1, 15, 4, "Aim_Smoothness", AimTabFrame) -- Добавляем кнопку бинда клавиши с полной поддержкой мыши CreateBindButton("Bind Aim Key", UDim2.new(0, 20, 0, 210), "Aim_Key", "Aim_Keybind_String", AimTabFrame) -- Assemble Player Section CreateToggleButton("Fullbright Mode", UDim2.new(0, 20, 0, 15), "Fullbright_Enabled", PlayerTabFrame) -- Unload Integration Button local ButtonUnload = Instance.new("TextButton") ButtonUnload.Size = UDim2.new(0, 340, 0, 35) ButtonUnload.Position = UDim2.new(0, 20, 1, -45) ButtonUnload.BackgroundColor3 = Color3.fromRGB(120, 120, 120) ButtonUnload.Text = "Unload Framework" ButtonUnload.TextColor3 = Color3.fromRGB(255, 255, 255) ButtonUnload.Font = Enum.Font.SourceSansBold ButtonUnload.TextSize = 13 ButtonUnload.Parent = MainFrame ButtonUnload.MouseButton1Click:Connect(function() _G.MainESP_Enabled = false _G.Aim_Enabled = false _G.Aim_WallCheck = false _G.Fullbright_Enabled = false _G.Distance_Enabled = false Lighting.Ambient = OriginalAmbient Lighting.OutdoorAmbient = OriginalOutdoorAmbient Lighting.Brightness = OriginalBrightness Lighting.ClockTime = OriginalClockTime FOVCircle:Remove() for _, conn in pairs(_G.DeltaConnections) do if conn then conn:Disconnect() end end for _, obj in pairs(_G.DeltaESP_Objects) do if obj.Name then obj.Name:Remove() end if obj.Health then obj.Health:Remove() end if obj.Distance then obj.Distance:Remove() end if obj.Cham then obj.Cham:Destroy() end if obj.Bones then for _, line in pairs(obj.Bones) do line:Remove() end end end ScreenGui:Destroy() end) -- Structural Connection Maps definition for Skeleton local Limbs = { {"Head", "UpperTorso"}, {"UpperTorso", "LowerTorso"}, {"UpperTorso", "LeftUpperArm"}, {"LeftUpperArm", "LeftLowerArm"}, {"LeftLowerArm", "LeftHand"}, {"UpperTorso", "RightUpperArm"}, {"RightUpperArm", "RightLowerArm"}, {"RightLowerArm", "RightHand"}, {"LowerTorso", "LeftUpperLeg"}, {"LeftUpperLeg", "LeftLowerLeg"}, {"LeftLowerLeg", "LeftFoot"}, {"LowerTorso", "RightUpperLeg"}, {"RightUpperLeg", "RightLowerLeg"}, {"RightLowerLeg", "RightFoot"} } -- Spatial Raycast Obstruction Evaluation Function local function IsVisible(TargetPart, Character) local CastOrigin = Camera.CFrame.Position local CastDirection = (TargetPart.Position - CastOrigin) local RaycastParamsData = RaycastParams.new() RaycastParamsData.FilterType = Enum.RaycastFilterType.Exclude RaycastParamsData.FilterDescendantsInstances = {LocalPlayer.Character, Character, Camera} RaycastParamsData.IgnoreWater = true local Result = workspace:Raycast(CastOrigin, CastDirection, RaycastParamsData) return Result == nil end -- Aimbot Target Search Engine Logic Function local function GetClosestPlayerToCursor() local Target = nil local ShortestDistance = _G.Aim_FOV for _, Player in pairs(Players:GetPlayers()) do if Player ~= LocalPlayer and Player.Character and Player.Character:FindFirstChild("Head") and Player.Character:FindFirstChild("Humanoid") and Player.Character.Humanoid.Health > 0 then local HeadPart = Player.Character.Head local Point, OnScreen = Camera:WorldToViewportPoint(HeadPart.Position) if OnScreen then if _G.Aim_WallCheck and not IsVisible(HeadPart, Player.Character) then continue end local Distance = (Vector2.new(Point.X, Point.Y) - Vector2.new(Mouse.X, Mouse.Y)).Magnitude if Distance < ShortestDistance then ShortestDistance = Distance Target = Player end end end end return Target end -- Core Render Loop Thread Integration Processing local function CreateESP(Player) if Player == LocalPlayer then return end local NameTag = Drawing.new("Text") NameTag.Visible = false; NameTag.Center = true; NameTag.Outline = true; NameTag.Font = 2; NameTag.Size = 13; NameTag.Color = Color3.fromRGB(255, 255, 255) local HealthTag = Drawing.new("Text") HealthTag.Visible = false; HealthTag.Center = true; HealthTag.Outline = true; HealthTag.Font = 2; HealthTag.Size = 13; HealthTag.Color = Color3.fromRGB(0, 255, 0) local DistanceTag = Drawing.new("Text") DistanceTag.Visible = false; DistanceTag.Center = true; DistanceTag.Outline = true; DistanceTag.Font = 2; DistanceTag.Size = 12; DistanceTag.Color = Color3.fromRGB(255, 255, 255) local BonesLines = {} for i = 1, #Limbs do local Line = Drawing.new("Line") Line.Visible = false; Line.Thickness = 1.5; Line.Color = Color3.fromRGB(255, 255, 255) table.insert(BonesLines, Line) end _G.DeltaESP_Objects[Player] = {Name = NameTag, Health = HealthTag, Distance = DistanceTag, Bones = BonesLines, Cham = nil} local RenderConn RenderConn = RunService.RenderStepped:Connect(function() -- 1. Fullbright Constant Evaluation Processing Loop if _G.Fullbright_Enabled then Lighting.Ambient = Color3.fromRGB(255, 255, 255) Lighting.OutdoorAmbient = Color3.fromRGB(255, 255, 255) Lighting.Brightness = 2 Lighting.ClockTime = 14 end -- 2. Process Core Aimbot Target Frame Locking -- Используем _G.Aim_Key для проверки нажатия (поддерживает все кнопки мыши) if _G.Aim_Enabled then local isKeyPressed = false if typeof(_G.Aim_Key) == "EnumItem" then -- Проверяем, является ли это кнопкой мыши if _G.Aim_Key.Name:find("MouseButton") or _G.Aim_Key.Name:find("MouseWheel") then isKeyPressed = UserInputService:IsMouseButtonPressed(_G.Aim_Key) else isKeyPressed = UserInputService:IsKeyDown(_G.Aim_Key) end end if isKeyPressed then local LockTarget = GetClosestPlayerToCursor() if LockTarget and LockTarget.Character and LockTarget.Character:FindFirstChild("Head") then local TargetHeadPos = LockTarget.Character.Head.Position local CamLookVector = (TargetHeadPos - Camera.CFrame.Position).Unit local TargetCFrame = CFrame.new(Camera.CFrame.Position, Camera.CFrame.Position + CamLookVector) Camera.CFrame = Camera.CFrame:Lerp(TargetCFrame, 1 / _G.Aim_Smoothness) end end end -- Update dynamic FOV Overlay Ring representation position if _G.Aim_Enabled then FOVCircle.Position = Vector2.new(Mouse.X, Mouse.Y + 36) FOVCircle.Radius = _G.Aim_FOV FOVCircle.Visible = true else FOVCircle.Visible = false end -- 3. Process Modular ESP Visualizations Rendering if Player.Character and Player.Character:FindFirstChild("HumanoidRootPart") and Player.Character:FindFirstChild("Humanoid") then local Char = Player.Character local Hum = Char.Humanoid local Root = Char.HumanoidRootPart local RootPos, OnScreen = Camera:WorldToViewportPoint(Root.Position) if Char:FindFirstChild("Head") then for _, child in pairs(Char.Head:GetChildren()) do if child:IsA("BillboardGui") or child:IsA("SurfaceGui") then child.Enabled = false end end end Hum.DisplayDistanceType = Enum.HumanoidDisplayDistanceType.None local CurrentObjects = _G.DeltaESP_Objects[Player] if CurrentObjects then if _G.MainESP_Enabled and _G.Chams_Enabled and OnScreen then if not CurrentObjects.Cham or CurrentObjects.Cham.Parent ~= Char then if CurrentObjects.Cham then CurrentObjects.Cham:Destroy() end local Highlight = Instance.new("Highlight") Highlight.FillColor = Color3.fromRGB(255, 0, 0); Highlight.FillTransparency = 0.4 Highlight.OutlineColor = Color3.fromRGB(255, 255, 255); Highlight.OutlineTransparency = 0 Highlight.DepthMode = Enum.HighlightDepthMode.AlwaysOnTop Highlight.Parent = Char CurrentObjects.Cham = Highlight end else if CurrentObjects.Cham then CurrentObjects.Cham:Destroy(); CurrentObjects.Cham = nil end end end if _G.MainESP_Enabled and OnScreen then local ScaleFactor = 1 / (RootPos.Z * math.tan(math.rad(Camera.FieldOfView / 2))) * 1000 local BoxHeight = ScaleFactor * 3.8 local TopY = RootPos.Y - BoxHeight / 2 local BottomY = RootPos.Y + BoxHeight / 2 local CalculatedDistance = math.floor((LocalPlayer.Character and LocalPlayer.Character:FindFirstChild("HumanoidRootPart") and (Root.Position - LocalPlayer.Character.HumanoidRootPart.Position).Magnitude) or 0) if _G.Names_Enabled then NameTag.Position = Vector2.new(RootPos.X, TopY - 26) NameTag.Text = Player.Name; NameTag.Visible = true else NameTag.Visible = false end if _G.Health_Enabled then HealthTag.Position = Vector2.new(RootPos.X, TopY - 14) HealthTag.Text = "HP: " .. math.floor(Hum.Health) .. "/" .. math.floor(Hum.MaxHealth) local Pct = Hum.Health / Hum.MaxHealth HealthTag.Color = Color3.fromRGB(255 * (1 - Pct), 255 * Pct, 0) HealthTag.Visible = true else HealthTag.Visible = false end -- Decoupled Spatial Distance text rendering layout below the entity bounding scale if _G.Distance_Enabled then DistanceTag.Position = Vector2.new(RootPos.X, BottomY + 5) DistanceTag.Text = "[" .. CalculatedDistance .. "m]" DistanceTag.Visible = true else DistanceTag.Visible = false end if _G.Skeleton_Enabled then for idx, limbPair in pairs(Limbs) do local PartA = Char:FindFirstChild(limbPair[1]) local PartB = Char:FindFirstChild(limbPair[2]) local LineObject = BonesLines[idx] if PartA and PartB then local OutA, OnScreenA = Camera:WorldToViewportPoint(PartA.Position) local OutB, OnScreenB = Camera:WorldToViewportPoint(PartB.Position) if OnScreenA and OnScreenB then LineObject.From = Vector2.new(OutA.X, OutA.Y) LineObject.To = Vector2.new(OutB.X, OutB.Y) LineObject.Visible = true else LineObject.Visible = false end else LineObject.Visible = false end end else for _, line in pairs(BonesLines) do line.Visible = false end end else NameTag.Visible = false HealthTag.Visible = false DistanceTag.Visible = false for _, line in pairs(BonesLines) do line.Visible = false end end else NameTag.Visible = false; HealthTag.Visible = false; DistanceTag.Visible = false for _, line in pairs(BonesLines) do line.Visible = false end if not Players:FindFirstChild(Player.Name) and _G.DeltaESP_Objects then NameTag:Remove(); HealthTag:Remove(); DistanceTag:Remove() for _, line in pairs(BonesLines) do line:Remove() end if _G.DeltaESP_Objects[Player] then if _G.DeltaESP_Objects[Player].Cham then _G.DeltaESP_Objects[Player].Cham:Destroy() end _G.DeltaESP_Objects[Player] = nil end RenderConn:Disconnect() end end end) table.insert(_G.DeltaConnections, RenderConn) end -- Initialize Loop Threads Systems for _, Player in pairs(Players:GetPlayers()) do CreateESP(Player) end table.insert(_G.DeltaConnections, Players.PlayerAdded:Connect(CreateESP)) table.insert(_G.DeltaConnections, Players.PlayerRemoving:Connect(function(Player) if _G.DeltaESP_Objects and _G.DeltaESP_Objects[Player] then _G.DeltaESP_Objects[Player].Name:Remove() _G.DeltaESP_Objects[Player].Health:Remove() _G.DeltaESP_Objects[Player].Distance:Remove() if _G.DeltaESP_Objects[Player].Cham then _G.DeltaESP_Objects[Player].Cham:Destroy() end for _, line in pairs(_G.DeltaESP_Objects[Player].Bones) do line:Remove() end _G.DeltaESP_Objects[Player] = nil end end)) -- GUI Frame Toggle Connection Mapping Event table.insert(_G.DeltaConnections, UserInputService.InputBegan:Connect(function(input, processed) if not processed and input.KeyCode == Enum.KeyCode.Insert then MainFrame.Visible = not MainFrame.Visible end end))