-- ========================================== -- TESTHUB - DELTA EXECUTOR COMPATIBLE V8 (PERSISTENT INPUTS) -- ========================================== local Players = game:GetService("Players") local RunService = game:GetService("RunService") local CoreGui = game:GetService("CoreGui") local Workspace = game:GetService("Workspace") local UserInputService = game:GetService("UserInputService") local TweenService = game:GetService("TweenService") local HttpService = game:GetService("HttpService") local LocalPlayer = Players.LocalPlayer local Camera = Workspace.CurrentCamera -- Original Values Storage local OriginalJumpPower = nil local OriginalJumpHeight = nil local OriginalUseJumpPower = nil -- Configuration State local Settings = { SpeedEnabled = false, SpeedValue = 16.0, JumpHeightEnabled = false, JumpHeightValue = 50.0, NoclipEnabled = false, CameraSensitivityEnabled = false, CameraSensitivityValue = 1.0, LineEspEnabled = false, LineEspMode = "Bottom", ChamEspEnabled = false, HealthBarEspEnabled = false, SpeedViewerEnabled = false, FovViewEnabled = false, FovViewValue = 70.0, TeamCheckEnabled = false, WallCheckEnabled = false, AimbotEnabled = false, AimbotMode = "Mobile", AimButtonLocked = false, AimbotStrength = 35.0, PredictionValue = 0.05, TpRepeatEnabled = false, FovCircleEnabled = false, FovSize = 150.0, FlyEnabled = false, FlySpeed = 60.0 } -- CONFIG SAVE & LOAD SYSTEM (DELTA COMPATIBLE) local ConfigFileName = "TestHub_Config.json" local function saveConfig() pcall(function() if writefile then local json = HttpService:JSONEncode(Settings) writefile(ConfigFileName, json) end end) end local function loadConfig() pcall(function() if isfile and readfile and isfile(ConfigFileName) then local content = readfile(ConfigFileName) local data = HttpService:JSONDecode(content) if data and type(data) == "table" then for k, v in pairs(data) do if Settings[k] ~= nil then Settings[k] = v end end end end end) end loadConfig() -- Storage / Controls local LineDrawings = {} local ChamHighlights = {} local HealthBarDrawings = {} local SpeedTags = {} local keysPressed = {} local HoldingAim = false local MobileAimActive = false local flyPosition = nil local lastTargetPosition = nil local lastTickTime = 0 local lastCamLook = Camera.CFrame.LookVector ------------------------------------------------- -- GUI PARENT SELECTION FOR DELTA ------------------------------------------------- local PlayerGui = LocalPlayer:WaitForChild("PlayerGui", 5) local TargetGuiParent = nil if gethui then TargetGuiParent = gethui() elseif PlayerGui then TargetGuiParent = PlayerGui else TargetGuiParent = CoreGui end ------------------------------------------------- -- ORIGINAL JUMP HEIGHT TRACKING ------------------------------------------------- local function saveOriginalJump(humanoid) if humanoid and not OriginalJumpPower then OriginalJumpPower = humanoid.JumpPower OriginalJumpHeight = humanoid.JumpHeight OriginalUseJumpPower = humanoid.UseJumpPower end end if LocalPlayer.Character and LocalPlayer.Character:FindFirstChildOfClass("Humanoid") then saveOriginalJump(LocalPlayer.Character:FindFirstChildOfClass("Humanoid")) end LocalPlayer.CharacterAdded:Connect(function(char) task.wait(0.5) local hum = char:WaitForChild("Humanoid", 5) if hum then OriginalJumpPower = nil saveOriginalJump(hum) end end) ------------------------------------------------- -- ACCURATE 3D CHARACTER BOUNDING CALCULATOR ------------------------------------------------- local function getCharacterBounds(character) if not character then return nil end local hrp = character:FindFirstChild("HumanoidRootPart") or character.PrimaryPart or character:FindFirstChild("Torso") or character:FindFirstChild("UpperTorso") local head = character:FindFirstChild("Head") if not hrp then return nil end local topWorld = head and (head.Position + Vector3.new(0, 0.8, 0)) or (hrp.Position + Vector3.new(0, 3.2, 0)) local botWorld = hrp.Position - Vector3.new(0, 3.2, 0) local topScreen, topOnScreen = Camera:WorldToViewportPoint(topWorld) local botScreen, botOnScreen = Camera:WorldToViewportPoint(botWorld) if topScreen.Z > 0 and botScreen.Z > 0 then local height = math.abs(topScreen.Y - botScreen.Y) local width = math.clamp(height / 1.6, 6, 800) local boxX = topScreen.X - width / 2 local boxY = math.min(topScreen.Y, botScreen.Y) return { X = boxX, Y = boxY, Width = width, Height = height, OnScreen = (topOnScreen or botOnScreen) } end return nil end ------------------------------------------------- -- BULLETPROOF GUI-BASED FOV CIRCLE ------------------------------------------------- local FovGui = Instance.new("ScreenGui") FovGui.Name = "TestHub_FOV" FovGui.ResetOnSpawn = false FovGui.DisplayOrder = 999998 FovGui.Parent = TargetGuiParent local FovFrame = Instance.new("Frame") FovFrame.Name = "FovCircle" FovFrame.AnchorPoint = Vector2.new(0.5, 0.5) FovFrame.Position = UDim2.new(0.5, 0, 0.5, 0) FovFrame.Size = UDim2.new(0, Settings.FovSize * 2, 0, Settings.FovSize * 2) FovFrame.BackgroundTransparency = 1 FovFrame.Visible = Settings.FovCircleEnabled FovFrame.Parent = FovGui local FovCorner = Instance.new("UICorner", FovFrame) FovCorner.CornerRadius = UDim.new(0.5, 0) local FovStroke = Instance.new("UIStroke", FovFrame) FovStroke.Color = Color3.fromRGB(255, 255, 255) FovStroke.Thickness = 1.5 FovStroke.Transparency = 0.2 ------------------------------------------------- -- RELIABLE HIGH-PRIORITY FOV OVERRIDE ------------------------------------------------- RunService:BindToRenderStep("TestHub_FOVOverride", Enum.RenderPriority.Camera.Value + 100, function() local currentCam = Workspace.CurrentCamera if currentCam and Settings.FovViewEnabled then currentCam.FieldOfView = math.clamp(Settings.FovViewValue, 1, 150) end end) ------------------------------------------------- -- UTILITY FUNCTIONS & FIRST-PERSON WALL CHECK ------------------------------------------------- local function isEnemy(player) if not player or player == LocalPlayer then return false end if Settings.TeamCheckEnabled then if player.Team ~= nil and LocalPlayer.Team ~= nil and player.Team == LocalPlayer.Team then return false end end return true end local function isVisible(targetPart, character) if not Settings.WallCheckEnabled then return true end local origin = Camera.CFrame.Position local direction = (targetPart.Position - origin) local raycastParams = RaycastParams.new() raycastParams.FilterType = Enum.RaycastFilterType.Exclude local filterList = {Camera} if LocalPlayer.Character then table.insert(filterList, LocalPlayer.Character) end if character then table.insert(filterList, character) end for _, child in pairs(Workspace:GetChildren()) do if child:IsA("Model") and (child.Name == "Arms" or child.Name == "Viewmodel" or child.Name:find("Gun") or child.Name:find("Weapon")) then table.insert(filterList, child) end end raycastParams.FilterDescendantsInstances = filterList raycastParams.IgnoreWater = true local result = Workspace:Raycast(origin, direction, raycastParams) if result then return false end return true end local function getClosestEnemyToPOV() local closestPlayer = nil local shortestDistance = math.huge local screenCenter = Vector2.new(Camera.ViewportSize.X / 2, Camera.ViewportSize.Y / 2) for _, player in pairs(Players:GetPlayers()) do if isEnemy(player) then if player.Character and player.Character:FindFirstChild("Head") and player.Character:FindFirstChildOfClass("Humanoid") and player.Character:FindFirstChildOfClass("Humanoid").Health > 0 then local head = player.Character.Head if isVisible(head, player.Character) then local pos, onScreen = Camera:WorldToViewportPoint(head.Position) if onScreen then local screenPos = Vector2.new(pos.X, pos.Y) local distance = (screenPos - screenCenter).Magnitude local withinFOV = true if Settings.FovCircleEnabled then withinFOV = (distance <= Settings.FovSize) end if withinFOV and distance < shortestDistance then closestPlayer = player shortestDistance = distance end end end end end end return closestPlayer end ------------------------------------------------- -- MOBILE FLOATING CONTROLS ------------------------------------------------- local MobileControlsGui = Instance.new("ScreenGui") MobileControlsGui.Name = "TestHub_MobileControls" MobileControlsGui.ResetOnSpawn = false MobileControlsGui.DisplayOrder = 999999 MobileControlsGui.Parent = TargetGuiParent local ToggleMenuBtn = Instance.new("TextButton") ToggleMenuBtn.Size = UDim2.new(0, 70, 0, 32) ToggleMenuBtn.Position = UDim2.new(0.02, 0, 0.15, 0) ToggleMenuBtn.BackgroundColor3 = Color3.fromRGB(20, 20, 20) ToggleMenuBtn.Text = "MENU" ToggleMenuBtn.TextColor3 = Color3.fromRGB(255, 255, 255) ToggleMenuBtn.Font = Enum.Font.GothamBold ToggleMenuBtn.TextSize = 12 ToggleMenuBtn.Parent = MobileControlsGui Instance.new("UICorner", ToggleMenuBtn).CornerRadius = UDim.new(0, 8) local ToggleMenuStroke = Instance.new("UIStroke", ToggleMenuBtn) ToggleMenuStroke.Color = Color3.fromRGB(200, 200, 200) ToggleMenuStroke.Thickness = 1.5 local menuDragInput = nil local menuStartTouchPos = nil local menuStartBtnPos = nil ToggleMenuBtn.InputBegan:Connect(function(input) if (input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch) and not menuDragInput then menuDragInput = input menuStartTouchPos = input.Position menuStartBtnPos = ToggleMenuBtn.Position end end) UserInputService.InputChanged:Connect(function(input) if input == menuDragInput then local delta = input.Position - menuStartTouchPos if delta.Magnitude > 10 then ToggleMenuBtn.Position = UDim2.new( menuStartBtnPos.X.Scale, menuStartBtnPos.X.Offset + delta.X, menuStartBtnPos.Y.Scale, menuStartBtnPos.Y.Offset + delta.Y ) end end end) local MainFrame UserInputService.InputEnded:Connect(function(input) if input == menuDragInput then local delta = (input.Position - menuStartTouchPos).Magnitude if delta <= 10 and MainFrame then MainFrame.Visible = not MainFrame.Visible end menuDragInput = nil end end) local MobileAimBtn = Instance.new("TextButton") MobileAimBtn.Size = UDim2.new(0, 70, 0, 70) MobileAimBtn.Position = UDim2.new(0.82, 0, 0.4, 0) MobileAimBtn.BackgroundColor3 = Color3.fromRGB(40, 40, 40) MobileAimBtn.BackgroundTransparency = 0.15 MobileAimBtn.Text = "AIM" MobileAimBtn.TextColor3 = Color3.fromRGB(255, 255, 255) MobileAimBtn.Font = Enum.Font.GothamBold MobileAimBtn.TextSize = 14 MobileAimBtn.Visible = false MobileAimBtn.Parent = MobileControlsGui local AimAspect = Instance.new("UIAspectRatioConstraint", MobileAimBtn) AimAspect.AspectRatio = 1.0 Instance.new("UICorner", MobileAimBtn).CornerRadius = UDim.new(0.5, 0) local AimStroke = Instance.new("UIStroke", MobileAimBtn) AimStroke.Color = Color3.fromRGB(255, 255, 255) AimStroke.Transparency = 0.3 AimStroke.Thickness = 2 local aimDragInput = nil local aimStartTouchPos = nil local aimStartBtnPos = nil MobileAimBtn.InputBegan:Connect(function(input) if (input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch) and not aimDragInput then aimDragInput = input aimStartTouchPos = input.Position aimStartBtnPos = MobileAimBtn.Position end end) UserInputService.InputChanged:Connect(function(input) if input == aimDragInput and not Settings.AimButtonLocked then local delta = input.Position - aimStartTouchPos if delta.Magnitude > 10 then MobileAimBtn.Position = UDim2.new( aimStartBtnPos.X.Scale, aimStartBtnPos.X.Offset + delta.X, aimStartBtnPos.Y.Scale, aimStartBtnPos.Y.Offset + delta.Y ) end end end) UserInputService.InputEnded:Connect(function(input) if input == aimDragInput then local delta = (input.Position - aimStartTouchPos).Magnitude if delta <= 10 then MobileAimActive = not MobileAimActive if MobileAimActive then MobileAimBtn.BackgroundColor3 = Color3.fromRGB(240, 240, 240) MobileAimBtn.TextColor3 = Color3.fromRGB(10, 10, 10) MobileAimBtn.Text = "AIM ON" else MobileAimBtn.BackgroundColor3 = Color3.fromRGB(40, 40, 40) MobileAimBtn.TextColor3 = Color3.fromRGB(255, 255, 255) MobileAimBtn.Text = "AIM" end end aimDragInput = nil end end) local function updateMobileControls() MobileAimBtn.Visible = Settings.AimbotEnabled and (Settings.AimbotMode == "Mobile") if not Settings.AimbotEnabled or Settings.AimbotMode ~= "Mobile" then MobileAimActive = false MobileAimBtn.BackgroundColor3 = Color3.fromRGB(40, 40, 40) MobileAimBtn.TextColor3 = Color3.fromRGB(255, 255, 255) MobileAimBtn.Text = "AIM" end end ------------------------------------------------- -- MOVEMENT, SPEED & NOCLIP SYSTEMS ------------------------------------------------- RunService.Heartbeat:Connect(function() local char = LocalPlayer.Character local humanoid = char and char:FindFirstChildOfClass("Humanoid") local hrp = char and char:FindFirstChild("HumanoidRootPart") if humanoid then saveOriginalJump(humanoid) if Settings.SpeedEnabled then humanoid.WalkSpeed = Settings.SpeedValue end if Settings.JumpHeightEnabled then humanoid.UseJumpPower = true humanoid.JumpPower = Settings.JumpHeightValue end end if Settings.TpRepeatEnabled and char and hrp then local closestEnemy = nil local shortestDist = math.huge for _, player in pairs(Players:GetPlayers()) do if isEnemy(player) and player.Character and player.Character:FindFirstChild("HumanoidRootPart") and player.Character:FindFirstChildOfClass("Humanoid") and player.Character:FindFirstChildOfClass("Humanoid").Health > 0 then local targetHrp = player.Character.HumanoidRootPart local dist = (hrp.Position - targetHrp.Position).Magnitude if dist < shortestDist then closestEnemy = player shortestDist = dist end end end if closestEnemy and closestEnemy.Character and closestEnemy.Character:FindFirstChild("HumanoidRootPart") then local targetHrp = closestEnemy.Character.HumanoidRootPart hrp.CFrame = targetHrp.CFrame * CFrame.new(0, 0, 2.5) end end end) RunService.Stepped:Connect(function() if Settings.NoclipEnabled and LocalPlayer.Character then for _, part in pairs(LocalPlayer.Character:GetDescendants()) do if part:IsA("BasePart") and part.CanCollide then part.CanCollide = false end end end end) ------------------------------------------------- -- SPEED VIEWER (OVER HEAD TAG) ------------------------------------------------- local function updateSpeedTag(player) if not Settings.SpeedViewerEnabled then if SpeedTags[player] then SpeedTags[player]:Destroy() SpeedTags[player] = nil end return end local char = player.Character local hrp = char and char:FindFirstChild("HumanoidRootPart") local head = char and char:FindFirstChild("Head") local humanoid = char and char:FindFirstChildOfClass("Humanoid") if char and hrp and head and humanoid and humanoid.Health > 0 then if not SpeedTags[player] then local bb = Instance.new("BillboardGui") bb.Name = "TestHub_SpeedTag" bb.Size = UDim2.new(0, 100, 0, 30) bb.StudsOffset = Vector3.new(0, 3.0, 0) bb.AlwaysOnTop = true bb.Adornee = head bb.Parent = head local txt = Instance.new("TextLabel") txt.Name = "SpeedText" txt.Size = UDim2.new(1, 0, 1, 0) txt.BackgroundTransparency = 1 txt.TextColor3 = Color3.fromRGB(255, 255, 255) txt.TextStrokeTransparency = 0.4 txt.Font = Enum.Font.GothamBold txt.TextSize = 11 txt.Parent = bb SpeedTags[player] = bb end local tag = SpeedTags[player] if tag and tag:FindFirstChild("SpeedText") then local speedVal = math.floor(Vector3.new(hrp.Velocity.X, 0, hrp.Velocity.Z).Magnitude + 0.5) tag.SpeedText.Text = "SPD: " .. speedVal end else if SpeedTags[player] then SpeedTags[player]:Destroy() SpeedTags[player] = nil end end end ------------------------------------------------- -- ESP DRAWING CREATORS (LINE, CHAM & HEALTH) ------------------------------------------------- local function getOrCreateLine(player) if not LineDrawings[player] and Drawing then local pcallSuccess, line = pcall(function() local l = Drawing.new("Line") l.Color = Color3.fromRGB(255, 255, 255) l.Thickness = 1.5 l.Transparency = 0.0 l.Visible = false return l end) if pcallSuccess and line then LineDrawings[player] = line end end return LineDrawings[player] end local function removeLine(player) if LineDrawings[player] then pcall(function() LineDrawings[player]:Remove() end) LineDrawings[player] = nil end end local function getOrCreateHealthBar(player) if not HealthBarDrawings[player] and Drawing then local pcallSuccess, bgBar, fgBar = pcall(function() local bg = Drawing.new("Square") bg.Filled = true bg.Color = Color3.fromRGB(0, 0, 0) bg.Transparency = 0.5 bg.Visible = false local fg = Drawing.new("Square") fg.Filled = true fg.Color = Color3.fromRGB(255, 255, 255) fg.Transparency = 0.9 fg.Visible = false return bg, fg end) if pcallSuccess and bgBar and fgBar then HealthBarDrawings[player] = {Background = bgBar, Foreground = fgBar} end end return HealthBarDrawings[player] end local function removeHealthBar(player) if HealthBarDrawings[player] then pcall(function() HealthBarDrawings[player].Background:Remove() HealthBarDrawings[player].Foreground:Remove() end) HealthBarDrawings[player] = nil end end local function applyCham(player) if not player.Character then return end local char = player.Character local hum = char:FindFirstChildOfClass("Humanoid") if not hum or hum.Health <= 0 then if ChamHighlights[player] then pcall(function() ChamHighlights[player]:Destroy() end) ChamHighlights[player] = nil end return end local existing = char:FindFirstChild("TestHub_Cham") if not existing then if ChamHighlights[player] then pcall(function() ChamHighlights[player]:Destroy() end) ChamHighlights[player] = nil end local highlight = Instance.new("Highlight") highlight.Name = "TestHub_Cham" highlight.FillColor = Color3.fromRGB(240, 240, 240) highlight.OutlineColor = Color3.fromRGB(50, 50, 50) highlight.FillTransparency = 0.5 highlight.OutlineTransparency = 0.0 highlight.DepthMode = Enum.HighlightDepthMode.AlwaysOnTop highlight.Adornee = char highlight.Parent = char ChamHighlights[player] = highlight end end local function removeCham(player) if ChamHighlights[player] then pcall(function() ChamHighlights[player]:Destroy() end) ChamHighlights[player] = nil end if player.Character then local existing = player.Character:FindFirstChild("TestHub_Cham") if existing then pcall(function() existing:Destroy() end) end end end ------------------------------------------------- -- MAIN RENDER LOOP (1ST & 3RD PERSON COMPATIBLE) ------------------------------------------------- UserInputService.InputBegan:Connect(function(input, processed) if processed then return end keysPressed[input.KeyCode] = true if input.UserInputType == Enum.UserInputType.MouseButton2 then HoldingAim = true end end) UserInputService.InputEnded:Connect(function(input) keysPressed[input.KeyCode] = nil if input.UserInputType == Enum.UserInputType.MouseButton2 then HoldingAim = false end end) RunService.RenderStepped:Connect(function(dt) Camera = Workspace.CurrentCamera or Camera local char = LocalPlayer.Character local hrp = char and char:FindFirstChild("HumanoidRootPart") local headPart = char and char:FindFirstChild("Head") local humanoid = char and char:FindFirstChildOfClass("Humanoid") local isFirstPerson = headPart and (Camera.CFrame.Position - headPart.Position).Magnitude < 2.2 -- UNIVERSAL CAMERA SENSITIVITY if Settings.CameraSensitivityEnabled then pcall(function() local ugs = UserSettings():GetService("UserGameSettings") local normSens = math.clamp(Settings.CameraSensitivityValue / 5, 0.01, 1.0) ugs.MouseSensitivity = normSens ugs.GamepadCameraSensitivity = normSens end) if Settings.CameraSensitivityValue ~= 1.0 then local currentCF = Camera.CFrame local currentLook = currentCF.LookVector local angle = math.acos(math.clamp(lastCamLook:Dot(currentLook), -1, 1)) if angle > 0.0001 and angle < 0.4 then local axis = lastCamLook:Cross(currentLook) if axis.Magnitude > 0.0001 then axis = axis.Unit local extraAngle = angle * (Settings.CameraSensitivityValue - 1) Camera.CFrame = currentCF * CFrame.fromAxisAngle(axis, extraAngle) end end lastCamLook = Camera.CFrame.LookVector else lastCamLook = Camera.CFrame.LookVector end else lastCamLook = Camera.CFrame.LookVector end -- Update GUI POV Circle if FovFrame then FovFrame.Visible = Settings.FovCircleEnabled local diameter = Settings.FovSize * 2 FovFrame.Size = UDim2.new(0, diameter, 0, diameter) FovFrame.Position = UDim2.new(0.5, 0, 0.5, 0) FovFrame.AnchorPoint = Vector2.new(0.5, 0.5) end -- 1. Direct Head Lock-On Aimbot local currentlyAiming = false if Settings.AimbotEnabled then if Settings.AimbotMode == "PC" then currentlyAiming = HoldingAim elseif Settings.AimbotMode == "Mobile" then currentlyAiming = MobileAimActive end end if currentlyAiming then local target = getClosestEnemyToPOV() if target and target.Character and target.Character:FindFirstChild("Head") then local head = target.Character.Head local currentPos = head.Position local currentTime = tick() local deltaTime = currentTime - lastTickTime local velocity = Vector3.new(0, 0, 0) if lastTargetPosition and deltaTime > 0 then velocity = (currentPos - lastTargetPosition) / deltaTime end lastTargetPosition = currentPos lastTickTime = currentTime local predictedPos = currentPos + (velocity * Settings.PredictionValue) local targetCF = CFrame.new(Camera.CFrame.Position, predictedPos) if Settings.AimbotStrength >= 99.9 then Camera.CFrame = targetCF else local alpha = math.clamp((Settings.AimbotStrength / 100) * (dt * 35), 0.01, 1) Camera.CFrame = Camera.CFrame:Lerp(targetCF, alpha) end if hrp and not isFirstPerson then local lookAtHorizontal = Vector3.new(predictedPos.X, hrp.Position.Y, predictedPos.Z) hrp.CFrame = CFrame.new(hrp.Position, lookAtHorizontal) end end else lastTargetPosition = nil end -- 2. Fly Logic if Settings.FlyEnabled and hrp then if humanoid then humanoid.PlatformStand = true end if not flyPosition then flyPosition = hrp.Position end hrp.Velocity = Vector3.new(0, 0, 0) local moveDirection = Vector3.new() local camCF = Camera.CFrame if humanoid and humanoid.MoveDirection.Magnitude > 0 then local rawMove = humanoid.MoveDirection local camLookHorizontal = Vector3.new(camCF.LookVector.X, 0, camCF.LookVector.Z).Unit local camRightHorizontal = Vector3.new(camCF.RightVector.X, 0, camCF.RightVector.Z).Unit moveDirection = (camCF.LookVector * rawMove:Dot(camLookHorizontal)) + (camCF.RightVector * rawMove:Dot(camRightHorizontal)) end if keysPressed[Enum.KeyCode.Space] then moveDirection = moveDirection + Vector3.new(0, 1, 0) end if keysPressed[Enum.KeyCode.LeftShift] then moveDirection = moveDirection - Vector3.new(0, 1, 0) end if moveDirection.Magnitude > 0 then flyPosition = flyPosition + (moveDirection.Unit * (Settings.FlySpeed * dt)) end hrp.CFrame = CFrame.new(flyPosition) * camCF.Rotation else flyPosition = nil if humanoid and humanoid.PlatformStand then humanoid.PlatformStand = false end end -- 3. ESP & Speed Viewer Loops for _, player in pairs(Players:GetPlayers()) do if player ~= LocalPlayer then local isEnemyTarget = isEnemy(player) updateSpeedTag(player) -- Line ESP if Settings.LineEspEnabled and isEnemyTarget and player.Character and player.Character:FindFirstChildOfClass("Humanoid") and player.Character:FindFirstChildOfClass("Humanoid").Health > 0 then local pRoot = player.Character.PrimaryPart or player.Character:FindFirstChild("HumanoidRootPart") if pRoot then local pos, onScreen = Camera:WorldToViewportPoint(pRoot.Position) local line = getOrCreateLine(player) if line then if onScreen then local originPos = Vector2.new(Camera.ViewportSize.X / 2, Camera.ViewportSize.Y) if Settings.LineEspMode == "Top" then originPos = Vector2.new(Camera.ViewportSize.X / 2, 0) elseif Settings.LineEspMode == "Middle" then originPos = Vector2.new(Camera.ViewportSize.X / 2, Camera.ViewportSize.Y / 2) elseif Settings.LineEspMode == "Head" then local myChar = LocalPlayer.Character local myHead = myChar and myChar:FindFirstChild("Head") if myHead then local myHeadPos, headOnScreen = Camera:WorldToViewportPoint(myHead.Position) if headOnScreen and myHeadPos.Z > 1 and not isFirstPerson then originPos = Vector2.new(myHeadPos.X, myHeadPos.Y) else originPos = Vector2.new(Camera.ViewportSize.X / 2, Camera.ViewportSize.Y / 2) end end end line.From = originPos line.To = Vector2.new(pos.X, pos.Y) line.Visible = true if line.Transparency < 0.8 then line.Transparency = math.clamp(line.Transparency + (dt * 4), 0, 0.8) end else line.Visible = false line.Transparency = 0.0 end end end else if LineDrawings[player] then LineDrawings[player].Visible = false LineDrawings[player].Transparency = 0.0 end end -- HEALTH BAR ESP if Settings.HealthBarEspEnabled and isEnemyTarget and player.Character then local hum = player.Character:FindFirstChildOfClass("Humanoid") if hum and hum.Health > 0 then local bounds = getCharacterBounds(player.Character) local bars = getOrCreateHealthBar(player) if bounds and bounds.OnScreen and bars then local healthPercent = math.clamp(hum.Health / hum.MaxHealth, 0, 1) local barHeight = bounds.Height * healthPercent local barY = bounds.Y + (bounds.Height - barHeight) bars.Background.Size = Vector2.new(4, bounds.Height) bars.Background.Position = Vector2.new(bounds.X - 6, bounds.Y) bars.Background.Visible = true bars.Foreground.Size = Vector2.new(2, barHeight) bars.Foreground.Position = Vector2.new(bounds.X - 5, barY) bars.Foreground.Visible = true else if bars then bars.Background.Visible = false bars.Foreground.Visible = false end end else if HealthBarDrawings[player] then HealthBarDrawings[player].Background.Visible = false HealthBarDrawings[player].Foreground.Visible = false end end else if HealthBarDrawings[player] then HealthBarDrawings[player].Background.Visible = false HealthBarDrawings[player].Foreground.Visible = false end end -- CHAM ESP if Settings.ChamEspEnabled and isEnemyTarget and player.Character and player.Character:FindFirstChildOfClass("Humanoid") and player.Character:FindFirstChildOfClass("Humanoid").Health > 0 then applyCham(player) else removeCham(player) end end end end) Players.PlayerRemoving:Connect(function(player) removeLine(player) removeCham(player) removeHealthBar(player) if SpeedTags[player] then SpeedTags[player]:Destroy() SpeedTags[player] = nil end end) ------------------------------------------------- -- TESTHUB: BLACK & WHITE GRADIENT UI FRAMEWORK ------------------------------------------------- local ScreenGui = Instance.new("ScreenGui") ScreenGui.Name = "TestHub_GUI" ScreenGui.ResetOnSpawn = false ScreenGui.DisplayOrder = 999999 ScreenGui.Parent = TargetGuiParent MainFrame = Instance.new("Frame") MainFrame.Name = "MainFrame" MainFrame.AnchorPoint = Vector2.new(0.5, 0.5) MainFrame.Position = UDim2.new(0.5, 0, 0.5, 0) MainFrame.Size = UDim2.new(0, 460, 0, 280) MainFrame.BackgroundColor3 = Color3.fromRGB(255, 255, 255) MainFrame.BorderSizePixel = 0 MainFrame.Active = true MainFrame.Parent = ScreenGui Instance.new("UICorner", MainFrame).CornerRadius = UDim.new(0, 10) local MainGradient = Instance.new("UIGradient", MainFrame) MainGradient.Color = ColorSequence.new({ ColorSequenceKeypoint.new(0.0, Color3.fromRGB(28, 28, 28)), ColorSequenceKeypoint.new(1.0, Color3.fromRGB(10, 10, 10)) }) MainGradient.Rotation = 90 local MainStroke = Instance.new("UIStroke", MainFrame) MainStroke.Color = Color3.fromRGB(80, 80, 80) MainStroke.Thickness = 1.5 local HeaderBar = Instance.new("Frame") HeaderBar.Size = UDim2.new(1, 0, 0, 38) HeaderBar.BackgroundColor3 = Color3.fromRGB(20, 20, 20) HeaderBar.BorderSizePixel = 0 HeaderBar.Parent = MainFrame Instance.new("UICorner", HeaderBar).CornerRadius = UDim.new(0, 10) local Title = Instance.new("TextLabel") Title.Size = UDim2.new(1, -50, 1, 0) Title.Position = UDim2.new(0, 14, 0, 0) Title.BackgroundTransparency = 1 Title.Text = "TestHub" Title.TextColor3 = Color3.fromRGB(240, 240, 240) Title.TextSize = 13 Title.Font = Enum.Font.GothamBold Title.TextXAlignment = Enum.TextXAlignment.Left Title.Parent = HeaderBar local CloseBtn = Instance.new("TextButton") CloseBtn.Size = UDim2.new(0, 26, 0, 26) CloseBtn.Position = UDim2.new(1, -32, 0.5, -13) CloseBtn.BackgroundColor3 = Color3.fromRGB(40, 40, 40) CloseBtn.Text = "X" CloseBtn.TextColor3 = Color3.fromRGB(220, 220, 220) CloseBtn.Font = Enum.Font.GothamBold CloseBtn.TextSize = 12 CloseBtn.Parent = HeaderBar Instance.new("UICorner", CloseBtn).CornerRadius = UDim.new(0, 6) CloseBtn.MouseButton1Click:Connect(function() MainFrame.Visible = false end) -- Window Drag Logic local guiDragInput, guiDragStart, guiStartPos HeaderBar.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then guiDragInput = input guiDragStart = input.Position guiStartPos = MainFrame.Position end end) UserInputService.InputChanged:Connect(function(input) if input == guiDragInput then local delta = input.Position - guiDragStart MainFrame.Position = UDim2.new(guiStartPos.X.Scale, guiStartPos.X.Offset + delta.X, guiStartPos.Y.Scale, guiStartPos.Y.Offset + delta.Y) end end) UserInputService.InputEnded:Connect(function(input) if input == guiDragInput then guiDragInput = nil end end) -- Sidebar Tabs local Sidebar = Instance.new("Frame") Sidebar.Size = UDim2.new(0, 110, 1, -48) Sidebar.Position = UDim2.new(0, 8, 0, 44) Sidebar.BackgroundColor3 = Color3.fromRGB(15, 15, 15) Sidebar.BackgroundTransparency = 0.3 Sidebar.BorderSizePixel = 0 Sidebar.Parent = MainFrame Instance.new("UICorner", Sidebar).CornerRadius = UDim.new(0, 8) local SidebarList = Instance.new("UIListLayout", Sidebar) SidebarList.Padding = UDim.new(0, 4) SidebarList.HorizontalAlignment = Enum.HorizontalAlignment.Center local SidebarPadding = Instance.new("UIPadding", Sidebar) SidebarPadding.PaddingTop = UDim.new(0, 6) local ContentArea = Instance.new("Frame") ContentArea.Size = UDim2.new(1, -134, 1, -48) ContentArea.Position = UDim2.new(0, 126, 0, 44) ContentArea.BackgroundTransparency = 1 ContentArea.ClipsDescendants = true ContentArea.Parent = MainFrame local TabFrames = {} local TabButtons = {} local activeTab = nil local function createTab(name) local tabBtn = Instance.new("TextButton") tabBtn.Size = UDim2.new(0, 98, 0, 32) tabBtn.BackgroundColor3 = Color3.fromRGB(25, 25, 25) tabBtn.Text = name tabBtn.TextColor3 = Color3.fromRGB(160, 160, 160) tabBtn.Font = Enum.Font.GothamMedium tabBtn.TextSize = 12 tabBtn.Parent = Sidebar Instance.new("UICorner", tabBtn).CornerRadius = UDim.new(0, 6) local pageGroup = Instance.new("CanvasGroup") pageGroup.Size = UDim2.new(1, 0, 1, 0) pageGroup.BackgroundTransparency = 1 pageGroup.BorderSizePixel = 0 pageGroup.GroupTransparency = 1 pageGroup.Visible = false pageGroup.Position = UDim2.new(0, 0, 0, 10) pageGroup.Parent = ContentArea local pageScroll = Instance.new("ScrollingFrame") pageScroll.Size = UDim2.new(1, 0, 1, 0) pageScroll.BackgroundTransparency = 1 pageScroll.BorderSizePixel = 0 pageScroll.ScrollBarThickness = 3 pageScroll.ScrollBarImageColor3 = Color3.fromRGB(200, 200, 200) pageScroll.Parent = pageGroup local pageList = Instance.new("UIListLayout", pageScroll) pageList.Padding = UDim.new(0, 8) pageList.HorizontalAlignment = Enum.HorizontalAlignment.Center TabFrames[name] = pageGroup TabButtons[name] = tabBtn tabBtn.MouseButton1Click:Connect(function() if activeTab == name then return end local oldTab = activeTab activeTab = name for tName, button in pairs(TabButtons) do local isSelected = (tName == name) TweenService:Create(button, TweenInfo.new(0.25, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), { BackgroundColor3 = isSelected and Color3.fromRGB(230, 230, 230) or Color3.fromRGB(25, 25, 25), TextColor3 = isSelected and Color3.fromRGB(10, 10, 10) or Color3.fromRGB(160, 160, 160) }):Play() end if oldTab and TabFrames[oldTab] then local oldFrame = TabFrames[oldTab] local tweenOut = TweenService:Create(oldFrame, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), { GroupTransparency = 1, Position = UDim2.new(0, 0, 0, -10) }) tweenOut:Play() tweenOut.Completed:Connect(function() if activeTab ~= oldTab then oldFrame.Visible = false end end) end local newFrame = TabFrames[name] newFrame.Visible = true newFrame.Position = UDim2.new(0, 0, 0, 10) newFrame.GroupTransparency = 1 TweenService:Create(newFrame, TweenInfo.new(0.25, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), { GroupTransparency = 0, Position = UDim2.new(0, 0, 0, 0) }):Play() end) return pageScroll end local function addToggle(page, text, settingKey, callback) local defaultState = Settings[settingKey] or false local frame = Instance.new("Frame") frame.Size = UDim2.new(0, 310, 0, 38) frame.BackgroundColor3 = Color3.fromRGB(20, 20, 20) frame.BackgroundTransparency = 0.4 frame.Parent = page Instance.new("UICorner", frame).CornerRadius = UDim.new(0, 6) local label = Instance.new("TextLabel") label.Size = UDim2.new(1, -60, 1, 0) label.Position = UDim2.new(0, 12, 0, 0) label.BackgroundTransparency = 1 label.Text = text label.TextColor3 = Color3.fromRGB(230, 230, 230) label.Font = Enum.Font.GothamMedium label.TextSize = 11 label.TextXAlignment = Enum.TextXAlignment.Left label.Parent = frame local btn = Instance.new("TextButton") btn.Size = UDim2.new(0, 42, 0, 22) btn.Position = UDim2.new(1, -50, 0.5, -11) btn.BackgroundColor3 = defaultState and Color3.fromRGB(240, 240, 240) or Color3.fromRGB(45, 45, 45) btn.Text = defaultState and "ON" or "OFF" btn.TextColor3 = defaultState and Color3.fromRGB(10, 10, 10) or Color3.fromRGB(200, 200, 200) btn.Font = Enum.Font.GothamBold btn.TextSize = 10 btn.Parent = frame Instance.new("UICorner", btn).CornerRadius = UDim.new(0, 11) local state = defaultState btn.MouseButton1Click:Connect(function() state = not state Settings[settingKey] = state btn.BackgroundColor3 = state and Color3.fromRGB(240, 240, 240) or Color3.fromRGB(45, 45, 45) btn.TextColor3 = state and Color3.fromRGB(10, 10, 10) or Color3.fromRGB(200, 200, 200) btn.Text = state and "ON" or "OFF" saveConfig() if callback then callback(state) end end) end local function addModeSelector(page, text, settingKey, options, callback) local currentVal = Settings[settingKey] or options[1] local frame = Instance.new("Frame") frame.Size = UDim2.new(0, 310, 0, 38) frame.BackgroundColor3 = Color3.fromRGB(20, 20, 20) frame.BackgroundTransparency = 0.4 frame.Parent = page Instance.new("UICorner", frame).CornerRadius = UDim.new(0, 6) local label = Instance.new("TextLabel") label.Size = UDim2.new(1, -110, 1, 0) label.Position = UDim2.new(0, 12, 0, 0) label.BackgroundTransparency = 1 label.Text = text label.TextColor3 = Color3.fromRGB(230, 230, 230) label.Font = Enum.Font.GothamMedium label.TextSize = 11 label.TextXAlignment = Enum.TextXAlignment.Left label.Parent = frame local btn = Instance.new("TextButton") btn.Size = UDim2.new(0, 85, 0, 24) btn.Position = UDim2.new(1, -93, 0.5, -12) btn.BackgroundColor3 = Color3.fromRGB(35, 35, 35) btn.Text = tostring(currentVal) btn.TextColor3 = Color3.fromRGB(255, 255, 255) btn.Font = Enum.Font.GothamBold btn.TextSize = 11 btn.Parent = frame Instance.new("UICorner", btn).CornerRadius = UDim.new(0, 6) btn.MouseButton1Click:Connect(function() local cur = Settings[settingKey] or options[1] local idx = 1 for i, opt in ipairs(options) do if opt == cur then idx = i break end end local nextIdx = (idx % #options) + 1 local nextVal = options[nextIdx] Settings[settingKey] = nextVal btn.Text = nextVal saveConfig() if callback then callback(nextVal) end end) end local function addInput(page, labelText, settingKey, callback) local defaultValue = Settings[settingKey] or 0 local frame = Instance.new("Frame") frame.Size = UDim2.new(0, 310, 0, 38) frame.BackgroundColor3 = Color3.fromRGB(20, 20, 20) frame.BackgroundTransparency = 0.4 frame.Parent = page Instance.new("UICorner", frame).CornerRadius = UDim.new(0, 6) local label = Instance.new("TextLabel") label.Size = UDim2.new(1, -90, 1, 0) label.Position = UDim2.new(0, 12, 0, 0) label.BackgroundTransparency = 1 label.Text = labelText label.TextColor3 = Color3.fromRGB(230, 230, 230) label.Font = Enum.Font.GothamMedium label.TextSize = 11 label.TextXAlignment = Enum.TextXAlignment.Left label.Parent = frame local box = Instance.new("TextBox") box.Size = UDim2.new(0, 70, 0, 24) box.Position = UDim2.new(1, -78, 0.5, -12) box.BackgroundColor3 = Color3.fromRGB(35, 35, 35) box.Text = tostring(defaultValue) box.TextColor3 = Color3.fromRGB(255, 255, 255) box.Font = Enum.Font.GothamBold box.TextSize = 11 box.Parent = frame Instance.new("UICorner", box).CornerRadius = UDim.new(0, 6) -- Live typing listener box:GetPropertyChangedSignal("Text"):Connect(function() local val = tonumber(box.Text) if val then Settings[settingKey] = val saveConfig() end end) -- Focus lost handler box.FocusLost:Connect(function() local val = tonumber(box.Text) if val then Settings[settingKey] = val saveConfig() if callback then callback(val) end else box.Text = tostring(Settings[settingKey] or defaultValue) end end) end -- Create Tabs local CombatTab = createTab("Combat") local VisualsTab = createTab("Visuals") local MovementTab = createTab("Movement") local SettingsTab = createTab("Settings") -- Select Combat Tab initially activeTab = "Combat" TabFrames["Combat"].Visible = true TabFrames["Combat"].GroupTransparency = 0 TabFrames["Combat"].Position = UDim2.new(0, 0, 0, 0) TabButtons["Combat"].BackgroundColor3 = Color3.fromRGB(230, 230, 230) TabButtons["Combat"].TextColor3 = Color3.fromRGB(10, 10, 10) -- Populate Combat addToggle(CombatTab, "Aimbot", "AimbotEnabled", function(state) Settings.AimbotEnabled = state updateMobileControls() end) addToggle(CombatTab, "Wall Check", "WallCheckEnabled", function(state) Settings.WallCheckEnabled = state end) addToggle(CombatTab, "Aim Mode", "AimbotMode", function(state) Settings.AimbotMode = state and "Mobile" or "PC" updateMobileControls() end) addInput(CombatTab, "Strength", "AimbotStrength", function(val) Settings.AimbotStrength = math.clamp(val, 0, 100) end) addInput(CombatTab, "Prediction", "PredictionValue", function(val) Settings.PredictionValue = math.clamp(val, 0.0, 10.0) end) addToggle(CombatTab, "TP Repeat", "TpRepeatEnabled", function(state) Settings.TpRepeatEnabled = state end) addToggle(CombatTab, "POV Circle", "FovCircleEnabled", function(state) Settings.FovCircleEnabled = state end) addInput(CombatTab, "POV Size", "FovSize", function(val) Settings.FovSize = math.clamp(val, 0, 750) end) -- Populate Visuals addToggle(VisualsTab, "Line ESP", "LineEspEnabled", function(state) Settings.LineEspEnabled = state end) addModeSelector(VisualsTab, "Line Mode", "LineEspMode", {"Bottom", "Middle", "Top", "Head"}, function(mode) Settings.LineEspMode = mode end) addToggle(VisualsTab, "Cham ESP", "ChamEspEnabled", function(state) Settings.ChamEspEnabled = state if not state then for _, pl in pairs(Players:GetPlayers()) do removeCham(pl) end end end) addToggle(VisualsTab, "Health Bar", "HealthBarEspEnabled", function(state) Settings.HealthBarEspEnabled = state end) addToggle(VisualsTab, "Speed Viewer", "SpeedViewerEnabled", function(state) Settings.SpeedViewerEnabled = state end) addToggle(VisualsTab, "FOV View", "FovViewEnabled", function(state) Settings.FovViewEnabled = state local cam = Workspace.CurrentCamera if cam then if state then cam.FieldOfView = Settings.FovViewValue else cam.FieldOfView = 70.0 end end end) addInput(VisualsTab, "FOV View Val", "FovViewValue", function(val) Settings.FovViewValue = math.clamp(val, 1, 150) if Settings.FovViewEnabled then local cam = Workspace.CurrentCamera if cam then cam.FieldOfView = Settings.FovViewValue end end end) -- Populate Movement addToggle(MovementTab, "Walk Speed", "SpeedEnabled", function(state) Settings.SpeedEnabled = state local char = LocalPlayer.Character local humanoid = char and char:FindFirstChildOfClass("Humanoid") if humanoid then if state then humanoid.WalkSpeed = Settings.SpeedValue else humanoid.WalkSpeed = 16 end end end) addInput(MovementTab, "Speed Value", "SpeedValue", function(val) Settings.SpeedValue = math.clamp(val, 0, 500) if Settings.SpeedEnabled then local char = LocalPlayer.Character local humanoid = char and char:FindFirstChildOfClass("Humanoid") if humanoid then humanoid.WalkSpeed = Settings.SpeedValue end end end) addToggle(MovementTab, "Camera Sensitivity", "CameraSensitivityEnabled", function(state) Settings.CameraSensitivityEnabled = state end) addInput(MovementTab, "Camera Sensitivity", "CameraSensitivityValue", function(val) Settings.CameraSensitivityValue = math.clamp(val, 0, 10) end) addToggle(MovementTab, "Noclip", "NoclipEnabled", function(state) Settings.NoclipEnabled = state end) addToggle(MovementTab, "Jump Height Mod", "JumpHeightEnabled", function(state) Settings.JumpHeightEnabled = state local char = LocalPlayer.Character local humanoid = char and char:FindFirstChildOfClass("Humanoid") if humanoid then if state then humanoid.UseJumpPower = true humanoid.JumpPower = Settings.JumpHeightValue else if OriginalJumpPower then humanoid.UseJumpPower = OriginalUseJumpPower or true humanoid.JumpPower = OriginalJumpPower if OriginalJumpHeight then humanoid.JumpHeight = OriginalJumpHeight end else humanoid.JumpPower = 50 end end end end) addInput(MovementTab, "Jump Power", "JumpHeightValue", function(val) Settings.JumpHeightValue = math.clamp(val, 0, 99.9) if Settings.JumpHeightEnabled then local char = LocalPlayer.Character local humanoid = char and char:FindFirstChildOfClass("Humanoid") if humanoid then humanoid.UseJumpPower = true humanoid.JumpPower = Settings.JumpHeightValue end end end) addToggle(MovementTab, "Fly Flight", "FlyEnabled", function(state) Settings.FlyEnabled = state end) addInput(MovementTab, "Fly Speed", "FlySpeed", function(val) Settings.FlySpeed = math.clamp(val, 0, 500) end) -- Populate Settings addToggle(SettingsTab, "Team Check", "TeamCheckEnabled", function(state) Settings.TeamCheckEnabled = state end) addToggle(SettingsTab, "Lock Aim Button", "AimButtonLocked", function(state) Settings.AimButtonLocked = state end) updateMobileControls()