local Players = game:GetService("Players") local UserInputService = game:GetService("UserInputService") local RunService = game:GetService("RunService") local player = Players.LocalPlayer local playerGui = player:WaitForChild("PlayerGui") local lockedTarget = nil local targetLockActive = false local autoMacroLockGeneration = 0 local busy = false local macroRunning = false --==================================================-- -- AUTO MACRO: TARGET APPROACH STATE --==================================================-- local AUTO_MACRO_DISTANCE = 0 local previousAutoMacroDistance = nil local autoMacroArmed = true local autoMacroPending = false local autoMacroTarget = nil local autoMacroConsumedGeneration = -1 local autoMacroConnection = nil local function resetAutoMacroTrigger() previousAutoMacroDistance = nil autoMacroArmed = true autoMacroPending = false autoMacroTarget = lockedTarget end local scriptEnabled = true local uiVisible = true local targetLabel = nil local targetTextConnection = nil local targetAncestryConnection = nil local targetVisibilityConnection = nil --==================================================-- -- MOUSE TRACKING --==================================================-- local mouseTrackingConnection = nil local mouseTrackingActive = false -- Actual game reticle screen position (from LockedOnInterface BillboardGui). local lastReticleScreenPosition = nil local lastReticleAdornee = nil local savedMousePosition = nil local MOUSE_TRACK_INTERVAL = 0.025 local mouseTrackAccumulator = 0 -- Temporary high-priority mouse tracking used while macro step 1 is executing. -- It bypasses the normal tracking interval so the cursor is refreshed every RenderStepped. local mouseTrackingCritical = false --==================================================-- -- MOVEMENT PREDICTION --==================================================-- -- How far ahead to predict the target's movement. -- 0.05 = 50 milliseconds. local PREDICTION_TIME = 0.25 -- Higher = reacts faster to direction changes. -- Lower = smoother but slower to react. local VELOCITY_SMOOTHING = 1.00 -- Ignore extremely small movement/noise. local MIN_VELOCITY = 0.5 -- Prevent extreme prediction distances. local MAX_PREDICTION_DISTANCE = 2 -- Previous target position used for velocity calculation. local lastTargetPosition = nil -- Smoothed target velocity. local smoothedTargetVelocity = Vector3.zero -- Time of previous velocity sample. local lastVelocityTime = nil --==================================================-- -- HIGHSPEED RUSH SETTINGS --==================================================-- local RUSH_CHECK_WINDOW = 0.75 local RUSH_CHECK_INTERVAL = 0.03 local REQUIRE_HEALTH_CHANGE = true local DISTANCE_SUCCESS_THRESHOLD = 8 --==================================================-- -- STATUS UI --==================================================-- local gui = Instance.new("ScreenGui") gui.Name = "TeleportLockStatus" gui.ResetOnSpawn = false gui.Parent = playerGui local status = Instance.new("TextLabel") status.Name = "Status" status.Size = UDim2.fromOffset(360, 45) status.Position = UDim2.new(0.5, -180, 0, 20) status.BackgroundColor3 = Color3.fromRGB(45, 45, 45) status.BackgroundTransparency = 0.15 status.BorderSizePixel = 0 status.TextColor3 = Color3.fromRGB(235, 235, 235) status.TextSize = 18 status.Font = Enum.Font.SourceSansBold status.Text = "Target: NONE" status.Parent = gui --==================================================-- -- HIGHSPEED RUSH DIAGNOSTIC UI --==================================================-- local LIVE_RANGE_LIMIT = 500 local liveTargetDistance = nil local liveDistanceText = "--" local liveRangeText = "NO TARGET" local diagnosticState = { status = "IDLE", target = "NONE", health = "--", distance = "--", details = "Waiting for Highspeed Rush..." } local diagnostic = Instance.new("Frame") diagnostic.Name = "HighspeedRushDiagnostic" diagnostic.Size = UDim2.fromOffset(360, 215) diagnostic.Position = UDim2.new(0.02, 0, 0.70, 0) diagnostic.BackgroundColor3 = Color3.fromRGB(20, 20, 20) diagnostic.BackgroundTransparency = 0.08 diagnostic.BorderSizePixel = 0 diagnostic.Parent = gui local diagnosticCorner = Instance.new("UICorner") diagnosticCorner.CornerRadius = UDim.new(0, 10) diagnosticCorner.Parent = diagnostic local diagnosticStroke = Instance.new("UIStroke") diagnosticStroke.Color = Color3.fromRGB(80, 80, 80) diagnosticStroke.Parent = diagnostic local diagnosticTitle = Instance.new("TextLabel") diagnosticTitle.Size = UDim2.new(1, -20, 0, 28) diagnosticTitle.Position = UDim2.fromOffset(10, 8) diagnosticTitle.BackgroundTransparency = 1 diagnosticTitle.Text = "Highspeed Rush Diagnostic" diagnosticTitle.TextColor3 = Color3.fromRGB(255, 210, 70) diagnosticTitle.TextSize = 15 diagnosticTitle.Font = Enum.Font.GothamBold diagnosticTitle.TextXAlignment = Enum.TextXAlignment.Left diagnosticTitle.Parent = diagnostic local diagnosticText = Instance.new("TextLabel") diagnosticText.Size = UDim2.new(1, -20, 0, 88) diagnosticText.Position = UDim2.fromOffset(10, 38) diagnosticText.BackgroundTransparency = 1 diagnosticText.TextColor3 = Color3.fromRGB(230, 230, 230) diagnosticText.TextSize = 12 diagnosticText.Font = Enum.Font.Code diagnosticText.TextXAlignment = Enum.TextXAlignment.Left diagnosticText.TextYAlignment = Enum.TextYAlignment.Top diagnosticText.Parent = diagnostic -- Live target range row: green means within 500 studs; red means outside. local rangeLight = Instance.new("Frame") rangeLight.Name = "TargetRangeLight" rangeLight.Size = UDim2.fromOffset(14, 14) rangeLight.Position = UDim2.fromOffset(12, 137) rangeLight.BackgroundColor3 = Color3.fromRGB(110, 110, 110) rangeLight.BorderSizePixel = 0 rangeLight.Parent = diagnostic local rangeLightCorner = Instance.new("UICorner") rangeLightCorner.CornerRadius = UDim.new(1, 0) rangeLightCorner.Parent = rangeLight local liveRangeLabel = Instance.new("TextLabel") liveRangeLabel.Name = "LiveTargetRange" liveRangeLabel.Size = UDim2.new(1, -38, 0, 22) liveRangeLabel.Position = UDim2.fromOffset(34, 133) liveRangeLabel.BackgroundTransparency = 1 liveRangeLabel.Text = "RANGE: NO TARGET | DISTANCE: --" liveRangeLabel.TextColor3 = Color3.fromRGB(220, 220, 220) liveRangeLabel.TextSize = 12 liveRangeLabel.Font = Enum.Font.GothamBold liveRangeLabel.TextXAlignment = Enum.TextXAlignment.Left liveRangeLabel.Parent = diagnostic -- Top-center octagonal range sign. Separate ScreenGui keeps it visible when H hides the main menu. -- F6 toggles it; drag the sign to move it and drag the lower-right handle to resize it. local rangePopupGui = Instance.new("ScreenGui") rangePopupGui.Name = "TeleportLockRangePopup" rangePopupGui.ResetOnSpawn = false rangePopupGui.IgnoreGuiInset = true rangePopupGui.DisplayOrder = 100 rangePopupGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling rangePopupGui.Parent = playerGui local rangePopup = Instance.new("Frame") rangePopup.Name = "DraggableResizableRangeSign" rangePopup.AnchorPoint = Vector2.new(0.5, 0) rangePopup.Position = UDim2.new(0.5, 0, 0, 18) rangePopup.Size = UDim2.fromOffset(190, 178) rangePopup.BackgroundTransparency = 1 rangePopup.BorderSizePixel = 0 rangePopup.Active = true rangePopup.Visible = false rangePopup.Parent = rangePopupGui local signOuter = Instance.new("Frame") signOuter.Name = "OctagonOuter" signOuter.Size = UDim2.fromOffset(150, 150) signOuter.Position = UDim2.fromOffset(20, 0) signOuter.BackgroundTransparency = 1 signOuter.BorderSizePixel = 0 signOuter.Parent = rangePopup local signBands = {} local bandWidths = {76, 108, 130, 142, 142, 130, 108, 76} for i, width in ipairs(bandWidths) do local band = Instance.new("Frame") band.Name = "OctagonBand" .. i band.AnchorPoint = Vector2.new(0.5, 0) band.Position = UDim2.new(0.5, 0, 0, (i - 1) * 18) band.Size = UDim2.fromOffset(width, 18) band.BorderSizePixel = 0 band.BackgroundColor3 = Color3.fromRGB(225, 55, 55) band.Parent = signOuter table.insert(signBands, band) end local signInner = Instance.new("Frame") signInner.Name = "OctagonInnerBorder" signInner.Size = UDim2.fromOffset(128, 128) signInner.Position = UDim2.fromOffset(11, 11) signInner.BackgroundTransparency = 1 signInner.BorderSizePixel = 0 signInner.Parent = signOuter local innerWidths = {62, 90, 108, 118, 118, 108, 90, 62} for i, width in ipairs(innerWidths) do local band = Instance.new("Frame") band.Name = "InnerBand" .. i band.AnchorPoint = Vector2.new(0.5, 0) band.Position = UDim2.new(0.5, 0, 0, (i - 1) * 15.5) band.Size = UDim2.fromOffset(width, 15.5) band.BorderSizePixel = 0 band.BackgroundColor3 = Color3.fromRGB(255, 255, 255) band.Parent = signInner end local signFace = Instance.new("Frame") signFace.Name = "OctagonFace" signFace.Size = UDim2.fromOffset(112, 112) signFace.Position = UDim2.fromOffset(19, 19) signFace.BackgroundColor3 = Color3.fromRGB(190, 35, 35) signFace.BorderSizePixel = 0 signFace.Parent = signOuter local faceWidths = {54, 78, 96, 104, 104, 96, 78, 54} for i, width in ipairs(faceWidths) do local band = Instance.new("Frame") band.Name = "FaceBand" .. i band.AnchorPoint = Vector2.new(0.5, 0) band.Position = UDim2.new(0.5, 0, 0, (i - 1) * 14) band.Size = UDim2.fromOffset(width, 14) band.BorderSizePixel = 0 band.BackgroundColor3 = Color3.fromRGB(190, 35, 35) band.Parent = signFace end local rangePopupStatus = Instance.new("TextLabel") rangePopupStatus.Name = "SignStatus" rangePopupStatus.BackgroundTransparency = 1 rangePopupStatus.AnchorPoint = Vector2.new(0.5, 0.5) rangePopupStatus.Position = UDim2.new(0.5, 0, 0.43, 0) rangePopupStatus.Size = UDim2.new(1, -12, 0, 38) rangePopupStatus.Font = Enum.Font.GothamBlack rangePopupStatus.Text = "STOP" rangePopupStatus.TextColor3 = Color3.new(1, 1, 1) rangePopupStatus.TextScaled = true rangePopupStatus.ZIndex = 5 rangePopupStatus.Parent = signFace local rangePopupDistance = Instance.new("TextLabel") rangePopupDistance.Name = "SignDistance" rangePopupDistance.BackgroundTransparency = 1 rangePopupDistance.AnchorPoint = Vector2.new(0.5, 0.5) rangePopupDistance.Position = UDim2.new(0.5, 0, 0.68, 0) rangePopupDistance.Size = UDim2.new(1, -14, 0, 22) rangePopupDistance.Font = Enum.Font.GothamBold rangePopupDistance.Text = "-- STUDS" rangePopupDistance.TextColor3 = Color3.new(1, 1, 1) rangePopupDistance.TextScaled = true rangePopupDistance.ZIndex = 5 rangePopupDistance.Parent = signFace local resizeHandle = Instance.new("TextButton") resizeHandle.Name = "ResizeHandle" resizeHandle.AnchorPoint = Vector2.new(1, 1) resizeHandle.Position = UDim2.new(1, 0, 1, 0) resizeHandle.Size = UDim2.fromOffset(20, 20) resizeHandle.BackgroundColor3 = Color3.fromRGB(35, 35, 42) resizeHandle.BorderSizePixel = 0 resizeHandle.Text = "↘" resizeHandle.TextColor3 = Color3.new(1, 1, 1) resizeHandle.TextSize = 15 resizeHandle.Font = Enum.Font.GothamBold resizeHandle.ZIndex = 10 resizeHandle.Parent = rangePopup local resizeCorner = Instance.new("UICorner") resizeCorner.CornerRadius = UDim.new(0, 5) resizeCorner.Parent = resizeHandle local draggingPopup = false local resizingPopup = false local dragStartInput = nil local popupStartPosition = nil local popupStartSize = nil local activePointerInput = nil local function beginPopupDrag(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then draggingPopup = true dragStartInput = input.Position popupStartPosition = rangePopup.Position activePointerInput = input end end rangePopup.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then if input.Position.X >= resizeHandle.AbsolutePosition.X and input.Position.Y >= resizeHandle.AbsolutePosition.Y then return end beginPopupDrag(input) end end) signOuter.InputBegan:Connect(beginPopupDrag) signFace.InputBegan:Connect(beginPopupDrag) rangePopupStatus.InputBegan:Connect(beginPopupDrag) rangePopupDistance.InputBegan:Connect(beginPopupDrag) resizeHandle.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then resizingPopup = true dragStartInput = input.Position popupStartSize = rangePopup.Size activePointerInput = input end end) UserInputService.InputChanged:Connect(function(input) if not dragStartInput then return end local isPointerMove = input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch if not isPointerMove then return end local delta = input.Position - dragStartInput if draggingPopup and popupStartPosition then rangePopup.Position = UDim2.new( popupStartPosition.X.Scale, popupStartPosition.X.Offset + delta.X, popupStartPosition.Y.Scale, popupStartPosition.Y.Offset + delta.Y ) elseif resizingPopup and popupStartSize then local width = math.clamp(popupStartSize.X.Offset + delta.X, 150, 420) local height = math.clamp(popupStartSize.Y.Offset + delta.Y, 150, 420) rangePopup.Size = UDim2.fromOffset(width, height) local scale = math.min(width / 190, height / 178) signOuter.Size = UDim2.fromOffset(150 * scale, 150 * scale) signOuter.Position = UDim2.fromOffset(20 * scale, 0) for i, band in ipairs(signBands) do band.Size = UDim2.fromOffset(bandWidths[i] * scale, 18 * scale) band.Position = UDim2.new(0.5, 0, 0, (i - 1) * 18 * scale) end signInner.Size = UDim2.fromOffset(128 * scale, 128 * scale) signInner.Position = UDim2.fromOffset(11 * scale, 11 * scale) for i, band in ipairs(signInner:GetChildren()) do if band:IsA("Frame") then band.Size = UDim2.fromOffset(innerWidths[i] * scale, 15.5 * scale) band.Position = UDim2.new(0.5, 0, 0, (i - 1) * 15.5 * scale) end end signFace.Size = UDim2.fromOffset(112 * scale, 112 * scale) signFace.Position = UDim2.fromOffset(19 * scale, 19 * scale) for i, band in ipairs(signFace:GetChildren()) do if band:IsA("Frame") then band.Size = UDim2.fromOffset(faceWidths[i] * scale, 14 * scale) band.Position = UDim2.new(0.5, 0, 0, (i - 1) * 14 * scale) end end rangePopupStatus.Size = UDim2.new(1, -12 * scale, 0, 38 * scale) rangePopupDistance.Size = UDim2.new(1, -14 * scale, 0, 22 * scale) resizeHandle.Size = UDim2.fromOffset(20 * scale, 20 * scale) end end) UserInputService.InputEnded:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then draggingPopup = false resizingPopup = false dragStartInput = nil popupStartPosition = nil popupStartSize = nil activePointerInput = nil end end) -- F6 toggles only the independent range sign. UserInputService.InputBegan:Connect(function(input) if not scriptEnabled or input.UserInputType ~= Enum.UserInputType.Keyboard or input.KeyCode ~= Enum.KeyCode.F6 or UserInputService:GetFocusedTextBox() then return end rangePopup.Visible = not rangePopup.Visible end) -- Click-to-copy status report. No terminal/console is required. local copyDiagnosticButton = Instance.new("TextButton") copyDiagnosticButton.Name = "CopyDiagnostic" copyDiagnosticButton.Size = UDim2.fromOffset(118, 25) copyDiagnosticButton.Position = UDim2.new(1, -128, 1, -33) copyDiagnosticButton.BackgroundColor3 = Color3.fromRGB(45, 95, 145) copyDiagnosticButton.BorderSizePixel = 0 copyDiagnosticButton.Text = "COPY REPORT" copyDiagnosticButton.TextColor3 = Color3.new(1, 1, 1) copyDiagnosticButton.TextSize = 12 copyDiagnosticButton.Font = Enum.Font.GothamBold copyDiagnosticButton.Parent = diagnostic local copyDiagnosticCorner = Instance.new("UICorner") copyDiagnosticCorner.CornerRadius = UDim.new(0, 6) copyDiagnosticCorner.Parent = copyDiagnosticButton local function buildDiagnosticReport() local viewport = workspace.CurrentCamera and workspace.CurrentCamera.ViewportSize local reticleText = lastReticleScreenPosition and string.format("%d, %d", lastReticleScreenPosition.X, lastReticleScreenPosition.Y) or "Unavailable" return table.concat({ "TELEPORT LOCK DIAGNOSTIC", "Player: " .. player.Name, "Target: " .. tostring(lockedTarget and lockedTarget.Name or "NONE"), "Target lock active: " .. tostring(targetLockActive), "Mouse tracking active: " .. tostring(mouseTrackingActive), "Reticle screen position: " .. reticleText, "Reticle adornee: " .. tostring(lastReticleAdornee), "Viewport: " .. (viewport and tostring(viewport) or "Unavailable"), "Macro running: " .. tostring(macroRunning), "Live distance: " .. tostring(liveDistanceText), "500-stud range: " .. tostring(liveRangeText), "Diagnostic: " .. tostring(diagnosticText and diagnosticText.Text or "Unavailable") }, "\n") end copyDiagnosticButton.MouseButton1Click:Connect(function() local clipboard = type(setclipboard) == "function" and setclipboard or type(toclipboard) == "function" and toclipboard if not clipboard then copyDiagnosticButton.Text = "NO CLIPBOARD API" else local ok = pcall(clipboard, buildDiagnosticReport()) copyDiagnosticButton.Text = ok and "COPIED!" or "COPY FAILED" end task.delay(1.5, function() if copyDiagnosticButton and copyDiagnosticButton.Parent then copyDiagnosticButton.Text = "COPY REPORT" end end) end) --==================================================-- -- DIAGNOSTIC FUNCTIONS --==================================================-- local function renderDiagnostic() if not diagnosticText then return end local shownDistance = liveTargetDistance and liveDistanceText or diagnosticState.distance diagnosticText.Text = "Status: " .. tostring(diagnosticState.status) .. "\n" .. "Target: " .. tostring(diagnosticState.target) .. "\n" .. "Health: " .. tostring(diagnosticState.health) .. "\n" .. "Distance: " .. tostring(shownDistance) .. "\n" .. "Details: " .. tostring(diagnosticState.details) end local function setDiagnostic(state, targetName, healthText, distanceText, details) diagnosticState.status = state diagnosticState.target = targetName diagnosticState.health = healthText diagnosticState.distance = distanceText diagnosticState.details = details renderDiagnostic() end local function resetDiagnostic() setDiagnostic( "IDLE", "NONE", "--", "--", "Waiting for Highspeed Rush..." ) end resetDiagnostic() --==================================================-- -- GET TARGET FROM TARGET TEXT -- Supports: -- Player: ighost1334 (8516208975) -- NPC: Dummy (NPC)...(7901742507) --==================================================-- local function findNPCModel(npcName, numericId) if not npcName or npcName == "" then return nil end -- First: exact model name match. for _, object in ipairs(workspace:GetDescendants()) do if object:IsA("Model") and object.Name == npcName then local humanoid = object:FindFirstChildOfClass("Humanoid") local root = object:FindFirstChild("HumanoidRootPart") if humanoid and root then return object end end end -- Second: try the numeric ID as a model name. if numericId then for _, object in ipairs(workspace:GetDescendants()) do if object:IsA("Model") and object.Name == tostring(numericId) then local humanoid = object:FindFirstChildOfClass("Humanoid") local root = object:FindFirstChild("HumanoidRootPart") if humanoid and root then return object end end end end return nil end local function getTargetFromTargetText(text) if not text or text == "" then return nil end text = tostring(text) --================================================-- -- EXTRACT NUMERIC ID --================================================-- local userId = string.match(text, "%((%d+)%s*%)") local numericId = userId and tonumber(userId) --================================================-- -- NORMAL PLAYER TARGET --================================================-- if numericId then local target = Players:GetPlayerByUserId(numericId) if target and target ~= player then return target end end --================================================-- -- NPC TARGET --================================================-- if string.find( string.lower(text), "%(npc%)" ) then -- Example: -- "Dummy (NPC)...(7901742507)" -- -- Everything before "(NPC)" is the NPC name. local npcName = string.match( text, "^%s*(.-)%s*%(%s*[Nn][Pp][Cc]%s*%)" ) if npcName then npcName = npcName:gsub("^%s+", "") :gsub("%s+$", "") local npcModel = findNPCModel( npcName, numericId ) if npcModel then -- Create a player-like target object. return { Name = npcModel.Name, UserId = numericId, Character = npcModel, IsNPC = true, NPCModel = npcModel } end end end return nil end --==================================================-- -- PROCESS TARGET TEXT --==================================================-- local function clearLockedTarget(reason) local hadTarget = lockedTarget ~= nil or targetLockActive lockedTarget = nil targetLockActive = false resetAutoMacroTrigger() resetTargetPrediction() status.Text = "Target: NONE" resetDiagnostic() if hadTarget and reason then print("[TeleportLock] TARGET UNLOCKED:", reason) end end local function processTargetText(text, confirmedByTextChange) local target = getTargetFromTargetText(text) if not target then clearLockedTarget("target UI no longer contains a valid target") return end if confirmedByTextChange then targetLockActive = true autoMacroLockGeneration = autoMacroLockGeneration + 1 end if lockedTarget ~= target then lockedTarget = target resetAutoMacroTrigger() lastTargetPosition = nil smoothedTargetVelocity = Vector3.zero lastVelocityTime = nil status.Text = "Target: " .. target.Name if target.IsNPC then print("[TeleportLock] LOCKED NPC:", target.Name) else print("[TeleportLock] LOCKED PLAYER:", target.Name, "(" .. target.UserId .. ")") end end end --==================================================-- -- DISCONNECT OLD LABEL --==================================================-- local function disconnectTargetLabel() if targetTextConnection then targetTextConnection:Disconnect() targetTextConnection = nil end if targetAncestryConnection then targetAncestryConnection:Disconnect() targetAncestryConnection = nil end targetLabel = nil end --==================================================-- -- CONNECT TO GAME'S REAL TARGET LABEL --==================================================-- local function connectTargetLabel(label) if targetLabel == label then return end disconnectTargetLabel() targetLabel = label if not targetLabel then return end print("[TeleportLock] Found target UI:", targetLabel:GetFullName()) targetTextConnection = targetLabel:GetPropertyChangedSignal("Text"):Connect(function() if targetLabel then processTargetText(targetLabel.Text, true) end end) targetVisibilityConnection = targetLabel:GetPropertyChangedSignal("Visible"):Connect(function() if not targetLabel then return end if targetLabel.Visible then local target = getTargetFromTargetText(targetLabel.Text) if target then processTargetText(targetLabel.Text, true) else clearLockedTarget("target UI became visible without a valid target") end else clearLockedTarget("target UI is no longer visible") end end) task.defer(function() if targetLabel and targetLabel.Parent and scriptEnabled then local target = getTargetFromTargetText(targetLabel.Text) if target and targetLabel.Visible then -- Read the existing UI target for display/target tracking, but do NOT -- treat an already-present stale name as a newly confirmed lock. processTargetText(targetLabel.Text, false) else clearLockedTarget("no active target in target UI") end end end) targetAncestryConnection = targetLabel.AncestryChanged:Connect(function(_, parent) if not parent then print("[TeleportLock] Target UI replaced") disconnectTargetLabel() clearLockedTarget("target UI was removed") end end) end --==================================================-- -- CHECK OBJECT --==================================================-- local function checkObject(object) if not ( object:IsA("TextLabel") or object:IsA("TextButton") or object:IsA("TextBox") ) then return end local target = getTargetFromTargetText( object.Text ) if target then connectTargetLabel(object) end end --==================================================-- -- INITIAL SEARCH --==================================================-- local function findTargetLabel() for _, object in ipairs( playerGui:GetDescendants() ) do if not targetLabel then checkObject(object) else break end end end findTargetLabel() --==================================================-- -- WATCH FOR NEW UI --==================================================-- local playerGuiConnection = playerGui.DescendantAdded:Connect( function(object) if scriptEnabled and not targetLabel then checkObject(object) end end ) --==================================================-- -- PERIODIC UI CHECK --==================================================-- task.spawn(function() while scriptEnabled and gui.Parent do if not targetLabel then findTargetLabel() elseif not targetLabel:IsDescendantOf(playerGui) then disconnectTargetLabel() clearLockedTarget("target UI left PlayerGui") findTargetLabel() elseif not targetLabel.Visible then clearLockedTarget("target UI is hidden") end task.wait(0.5) end end) --==================================================-- -- GET TARGET CHARACTER --==================================================-- local function getTargetCharacter() if not lockedTarget then return nil end local character = lockedTarget.Character if not character then return nil end local humanoid = character:FindFirstChildOfClass( "Humanoid" ) local root = character:FindFirstChild( "HumanoidRootPart" ) if not humanoid or humanoid.Health <= 0 then return nil end if not root then return nil end return character, root end -- Refresh the displayed distance independently of the macro checkpoint. -- 10 updates/second keeps the readout responsive without per-frame UI work. task.spawn(function() while scriptEnabled and gui.Parent do local target = lockedTarget local myCharacter = player.Character local myRoot = myCharacter and myCharacter:FindFirstChild("HumanoidRootPart") local targetCharacter = target and target.Character local targetRoot = targetCharacter and targetCharacter:FindFirstChild("HumanoidRootPart") if target and myRoot and targetRoot then liveTargetDistance = (myRoot.Position - targetRoot.Position).Magnitude liveDistanceText = string.format("%.1f studs", liveTargetDistance) if liveTargetDistance <= LIVE_RANGE_LIMIT then liveRangeText = "WITHIN 500 STUDS" rangeLight.BackgroundColor3 = Color3.fromRGB(35, 210, 95) liveRangeLabel.TextColor3 = Color3.fromRGB(90, 255, 145) else liveRangeText = "OUTSIDE 500 STUDS" rangeLight.BackgroundColor3 = Color3.fromRGB(225, 55, 55) liveRangeLabel.TextColor3 = Color3.fromRGB(255, 105, 105) end liveRangeLabel.Text = string.format( "RANGE: %s | DISTANCE: %.1f STUDS", liveRangeText, liveTargetDistance ) local insideRange = liveTargetDistance <= LIVE_RANGE_LIMIT local signColor = insideRange and Color3.fromRGB(20, 155, 65) or Color3.fromRGB(190, 35, 35) for _, band in ipairs(signBands) do band.BackgroundColor3 = signColor end for _, band in ipairs(signFace:GetChildren()) do if band:IsA("Frame") then band.BackgroundColor3 = signColor end end signFace.BackgroundColor3 = signColor rangePopupStatus.Text = insideRange and "GO" or "STOP" rangePopupDistance.Text = string.format("%.1f STUDS", liveTargetDistance) else liveTargetDistance = nil liveDistanceText = "--" liveRangeText = "NO TARGET" rangeLight.BackgroundColor3 = Color3.fromRGB(110, 110, 110) liveRangeLabel.TextColor3 = Color3.fromRGB(220, 220, 220) liveRangeLabel.Text = "RANGE: NO TARGET | DISTANCE: --" local signColor = Color3.fromRGB(90, 90, 90) for _, band in ipairs(signBands) do band.BackgroundColor3 = signColor end for _, band in ipairs(signFace:GetChildren()) do if band:IsA("Frame") then band.BackgroundColor3 = signColor end end signFace.BackgroundColor3 = signColor rangePopupStatus.Text = "NO TARGET" rangePopupDistance.Text = "-- STUDS" end renderDiagnostic() task.wait(0.10) end end) --==================================================-- -- MOVEMENT PREDICTION --==================================================-- local function resetTargetPrediction() lastTargetPosition = nil smoothedTargetVelocity = Vector3.zero lastVelocityTime = nil end --==================================================-- -- GET PREDICTED TARGET POSITION --==================================================-- local function getPredictedTargetPosition(bodyPart) if not bodyPart then return nil end local currentPosition = bodyPart.Position local now = os.clock() --================================================-- -- FIRST SAMPLE --================================================-- if not lastTargetPosition or not lastVelocityTime then lastTargetPosition = currentPosition lastVelocityTime = now smoothedTargetVelocity = Vector3.zero -- First frame aims at actual position. return currentPosition end --================================================-- -- TIME SINCE LAST SAMPLE --================================================-- local deltaTime = now - lastVelocityTime -- Protect against invalid or huge gaps. if deltaTime <= 0 or deltaTime > 0.25 then lastTargetPosition = currentPosition lastVelocityTime = now smoothedTargetVelocity = Vector3.zero return currentPosition end --================================================-- -- CALCULATE ACTUAL MOVEMENT VELOCITY --================================================-- local rawVelocity = (currentPosition - lastTargetPosition) / deltaTime lastTargetPosition = currentPosition lastVelocityTime = now --================================================-- -- IGNORE TINY MOVEMENT / POSITIONAL NOISE --================================================-- if rawVelocity.Magnitude < MIN_VELOCITY then rawVelocity = Vector3.zero end --================================================-- -- SMOOTH VELOCITY --================================================-- smoothedTargetVelocity = smoothedTargetVelocity:Lerp( rawVelocity, VELOCITY_SMOOTHING ) --================================================-- -- CALCULATE FUTURE POSITION --================================================-- local prediction = smoothedTargetVelocity * PREDICTION_TIME --================================================-- -- LIMIT MAXIMUM PREDICTION DISTANCE --================================================-- if prediction.Magnitude > MAX_PREDICTION_DISTANCE then prediction = prediction.Unit * MAX_PREDICTION_DISTANCE end --================================================-- -- RETURN PREDICTED POSITION --================================================-- return currentPosition + prediction end --==================================================-- -- GET TARGET SCREEN POSITION --==================================================-- local function getTargetMousePosition() -- The game exposes its real lock-on reticle as a 6x6 Frame inside a -- BillboardGui attached to the locked target's HumanoidRootPart. -- BillboardGui.AbsolutePosition is not a reliable screen coordinate; -- project its Adornee through the active camera instead. -- Do not gate this on targetLockActive: when this script starts after the -- game has already locked a target, the initial UI scan intentionally does -- not count as a new lock event. The live reticle/adornee checks below are -- the authoritative confirmation that the game is currently targeting it. if not lockedTarget then return nil end local character, root = getTargetCharacter() local camera = workspace.CurrentCamera if not character or not root or not camera then return nil end local interface = playerGui:FindFirstChild("LockedOnInterface") if not interface then return nil end local reticle = interface:FindFirstChild("Reticle", true) if not reticle or not reticle:IsA("GuiObject") or not reticle.Visible then return nil end local billboard = reticle:FindFirstAncestorWhichIsA("BillboardGui") if not billboard or not billboard.Enabled then return nil end -- Respect visibility on every GuiObject ancestor of the reticle. local ancestor = reticle.Parent while ancestor and ancestor ~= interface do if ancestor:IsA("GuiObject") and not ancestor.Visible then return nil end ancestor = ancestor.Parent end local adornee = billboard.Adornee if not adornee or not adornee:IsA("BasePart") then return nil end if not adornee:IsDescendantOf(character) then return nil end -- The supplied report confirms Adornee = HumanoidRootPart and zero -- Billboard offsets. This is the world point the game's reticle marks. local projected, onScreen = camera:WorldToViewportPoint(adornee.Position) if not onScreen or projected.Z <= 0 or projected.X ~= projected.X or projected.Y ~= projected.Y or math.abs(projected.X) == math.huge or math.abs(projected.Y) == math.huge then return nil end local x, y = math.round(projected.X), math.round(projected.Y) lastReticleScreenPosition = Vector2.new(x, y) lastReticleAdornee = adornee:GetFullName() return x, y end --==================================================-- -- MOUSE MOVEMENT --==================================================-- local function moveMouseAbsolute(x, y) if type(mousemoveabs) ~= "function" then error( "[TeleportLock] mousemoveabs is unavailable in this executor." ) end mousemoveabs( x, y ) end --==================================================-- -- STOP MOUSE TRACKING --==================================================-- local function stopMouseTracking() mouseTrackingActive = false if mouseTrackingConnection then mouseTrackingConnection:Disconnect() mouseTrackingConnection = nil end mouseTrackAccumulator = 0 mouseTrackingCritical = false -- Reset movement prediction. resetTargetPrediction() end --==================================================-- -- START CONTINUOUS HEAD TRACKING --==================================================-- local function startMouseTracking() stopMouseTracking() if not scriptEnabled then return end if not lockedTarget then return end mouseTrackingActive = true mouseTrackAccumulator = 0 -- Start with a fresh movement sample. resetTargetPrediction() print( "[TeleportLock] Continuous target tracking STARTED" ) print( "[Mouse] Head tracking prediction lead (0 = exact head):", PREDICTION_TIME, "seconds" ) mouseTrackingConnection = RunService.RenderStepped:Connect( function(deltaTime) if not scriptEnabled then stopMouseTracking() return end if not mouseTrackingActive then return end if not lockedTarget then return end -- Cap expensive GUI/camera lookups and executor mouse calls at 40Hz. mouseTrackAccumulator = mouseTrackAccumulator + deltaTime if mouseTrackAccumulator < MOUSE_TRACK_INTERVAL then return end mouseTrackAccumulator = 0 local x, y = getTargetMousePosition() if not x or not y then -- A single bad frame (respawn/streaming/camera transition) -- should not terminate tracking. The next frame retries. return end if type(mousemoveabs) == "function" then moveMouseAbsolute( x, y ) end end ) end --==================================================-- -- MACRO TIMINGS --==================================================-- --==================================================-- -- FIXED KEY 1 -> KEY 2 TIMING --==================================================-- -- Shift+F always uses this exact configured delay; server ping does not change it. -- The timing panel lets you change this delay while the script is running. local FIXED_KEY1_TO_KEY2_DELAY_MS = 1 -- User-adjustable in the timing panel (0-5000 ms). local KEY1_TO_KEY2_BASE_MS = FIXED_KEY1_TO_KEY2_DELAY_MS local KEY1_TO_KEY2_PING_FACTOR = 0 local KEY1_TO_KEY2_MIN_MS = 0.2 local KEY1_TO_KEY2_MAX_MS = 0.2 local KEY1_TO_KEY2_SMOOTHING = 0.25 local PING_SMOOTHING = 0.20 local PING_UPDATE_INTERVAL = 0.20 local currentPingMs = nil local smoothedPingMs = nil local recommendedTransitionMs = nil local lastAppliedTransitionMs = nil local transitionSamples = 0 local timingStatus = "FIXED" local function clampNumber(value, minimum, maximum) return math.max(minimum, math.min(maximum, value)) end local function getServerPingMs() local success, value = pcall(function() local stats = game:GetService("Stats") local network = stats:FindFirstChild("Network") if not network then return nil end local serverStatsItem = network:FindFirstChild("ServerStatsItem") if not serverStatsItem then return nil end local dataPing = serverStatsItem:FindFirstChild("Data Ping") if not dataPing then return nil end local ping = dataPing:GetValue() if type(ping) ~= "number" then return nil end return ping end) if success and type(value) == "number" then return value end return nil end local function updatePingSample() local ping = getServerPingMs() if not ping then timingStatus = "PING UNAVAILABLE" return end currentPingMs = ping if not smoothedPingMs then smoothedPingMs = ping else smoothedPingMs = smoothedPingMs + ((ping - smoothedPingMs) * PING_SMOOTHING) end local rawRecommendation = KEY1_TO_KEY2_BASE_MS + (smoothedPingMs * KEY1_TO_KEY2_PING_FACTOR) rawRecommendation = clampNumber( rawRecommendation, KEY1_TO_KEY2_MIN_MS, KEY1_TO_KEY2_MAX_MS ) if not recommendedTransitionMs then recommendedTransitionMs = rawRecommendation else recommendedTransitionMs = recommendedTransitionMs + ((rawRecommendation - recommendedTransitionMs) * KEY1_TO_KEY2_SMOOTHING) end timingStatus = "FIXED" end local function getRecommendedKey1ToKey2DelayMs() updatePingSample() if not recommendedTransitionMs then recommendedTransitionMs = clampNumber( KEY1_TO_KEY2_BASE_MS + ((smoothedPingMs or 50) * KEY1_TO_KEY2_PING_FACTOR), KEY1_TO_KEY2_MIN_MS, KEY1_TO_KEY2_MAX_MS ) end return recommendedTransitionMs end --==================================================-- -- PING / TIMING SAMPLER --==================================================-- task.spawn(function() while scriptEnabled do updatePingSample() task.wait(PING_UPDATE_INTERVAL) end end) --==================================================-- -- DYNAMIC TELEPORT TIMING UI --==================================================-- local timingWindow = Instance.new("Frame") timingWindow.Name = "DynamicTeleportTiming" timingWindow.Size = UDim2.fromOffset(360, 215) timingWindow.Position = UDim2.new(1, -380, 0, 20) timingWindow.BackgroundColor3 = Color3.fromRGB(20, 20, 20) timingWindow.BackgroundTransparency = 0.08 timingWindow.BorderSizePixel = 0 timingWindow.Parent = gui local timingCorner = Instance.new("UICorner") timingCorner.CornerRadius = UDim.new(0, 10) timingCorner.Parent = timingWindow local timingStroke = Instance.new("UIStroke") timingStroke.Color = Color3.fromRGB(80, 80, 80) timingStroke.Parent = timingWindow local timingTitle = Instance.new("TextLabel") timingTitle.Size = UDim2.new(1, -20, 0, 28) timingTitle.Position = UDim2.fromOffset(10, 8) timingTitle.BackgroundTransparency = 1 timingTitle.Text = "Dynamic Teleport Timing" timingTitle.TextColor3 = Color3.fromRGB(120, 210, 255) timingTitle.TextSize = 15 timingTitle.Font = Enum.Font.GothamBold timingTitle.TextXAlignment = Enum.TextXAlignment.Left timingTitle.Parent = timingWindow local timingText = Instance.new("TextLabel") timingText.Size = UDim2.new(1, -20, 0, 125) timingText.Position = UDim2.fromOffset(10, 38) timingText.BackgroundTransparency = 1 timingText.TextColor3 = Color3.fromRGB(230, 230, 230) timingText.TextSize = 12 timingText.Font = Enum.Font.Code timingText.TextXAlignment = Enum.TextXAlignment.Left timingText.TextYAlignment = Enum.TextYAlignment.Top timingText.Parent = timingWindow -- Runtime control for the delay between pressing key 1 and key 2. local timingInputLabel = Instance.new("TextLabel") timingInputLabel.Name = "Key1ToKey2DelayLabel" timingInputLabel.Size = UDim2.fromOffset(185, 24) timingInputLabel.Position = UDim2.fromOffset(10, 178) timingInputLabel.BackgroundTransparency = 1 timingInputLabel.Text = "Key 1 -> 2 delay (ms):" timingInputLabel.TextColor3 = Color3.fromRGB(230, 230, 230) timingInputLabel.TextSize = 12 timingInputLabel.Font = Enum.Font.Gotham timingInputLabel.TextXAlignment = Enum.TextXAlignment.Left timingInputLabel.Parent = timingWindow local timingInput = Instance.new("TextBox") timingInput.Name = "Key1ToKey2DelayInput" timingInput.Size = UDim2.fromOffset(125, 26) timingInput.Position = UDim2.fromOffset(220, 176) timingInput.BackgroundColor3 = Color3.fromRGB(38, 38, 38) timingInput.BorderSizePixel = 0 timingInput.TextColor3 = Color3.fromRGB(255, 255, 255) timingInput.PlaceholderColor3 = Color3.fromRGB(160, 160, 160) timingInput.TextSize = 13 timingInput.Font = Enum.Font.Code timingInput.ClearTextOnFocus = false timingInput.Text = tostring(FIXED_KEY1_TO_KEY2_DELAY_MS) timingInput.PlaceholderText = "0-5000" timingInput.Parent = timingWindow local updateTimingUI local timingInputCorner = Instance.new("UICorner") timingInputCorner.CornerRadius = UDim.new(0, 5) timingInputCorner.Parent = timingInput timingInput.FocusLost:Connect(function() local requestedDelay = tonumber(timingInput.Text) if not requestedDelay then timingInput.Text = tostring(FIXED_KEY1_TO_KEY2_DELAY_MS) timingStatus = "INVALID DELAY - UNCHANGED" updateTimingUI() return end FIXED_KEY1_TO_KEY2_DELAY_MS = clampNumber(requestedDelay, 0, 5000) KEY1_TO_KEY2_BASE_MS = FIXED_KEY1_TO_KEY2_DELAY_MS timingInput.Text = tostring(FIXED_KEY1_TO_KEY2_DELAY_MS) timingStatus = "FIXED / UPDATED" print("[Macro] Key 1 -> Key 2 delay set to", FIXED_KEY1_TO_KEY2_DELAY_MS, "ms") updateTimingUI() end) updateTimingUI = function() if not timingText then return end local pingText = currentPingMs and string.format("%.0f ms", currentPingMs) or "--" local smoothPingText = smoothedPingMs and string.format("%.1f ms", smoothedPingMs) or "--" local recommendedText = recommendedTransitionMs and string.format("%.1f ms", recommendedTransitionMs) or "--" local appliedText = lastAppliedTransitionMs and string.format("%.3f ms", lastAppliedTransitionMs) or "--" timingText.Text = "Server Ping: " .. pingText .. "\n" .. "Smoothed Ping: " .. smoothPingText .. "\n" .. "Fixed 1 -> 2 Delay: " .. string.format("%.3f ms", FIXED_KEY1_TO_KEY2_DELAY_MS) .. "\n" .. "Last Applied: " .. appliedText .. "\n" .. "Samples: " .. tostring(transitionSamples) .. "\n" .. "Timing Mode: FIXED (ping ignored)\n" .. "Configured Delay: " .. string.format("%.3f ms", FIXED_KEY1_TO_KEY2_DELAY_MS) .. "\n" .. "Status: " .. timingStatus end task.spawn(function() while scriptEnabled do updateTimingUI() task.wait(0.10) end end) --==================================================-- -- STEP 2 HEALTH CONFIRMATION --==================================================-- -- Step 2 (Keys 3-7) must actually reduce the locked target's health -- before the macro is allowed to continue to the remaining steps. local STEP2_HEALTH_CHECK_WINDOW = 0.75 local STEP2_HEALTH_CHECK_INTERVAL = 0.03 local macroSteps = { -- Macrostep 1: Key 1 { key = Enum.KeyCode.One, delayAfter = 0 }, -- Macrostep 2: Key 2 (delay controlled in the timing panel) { key = Enum.KeyCode.Two, delayAfter = 0 }, -- Macrostep 3: Keys 3-7 simultaneously { keys = { Enum.KeyCode.Three, Enum.KeyCode.Four, Enum.KeyCode.Five, Enum.KeyCode.Six, Enum.KeyCode.Seven, Enum.KeyCode.Eight, }, delayAfter = 0 }, -- Macrostep 4: Key 8 ten times, 50 ms between attempts { key = Enum.KeyCode.Nine, delayAfter = 0.150, repeats = 10 }, } local function pressMacroKey(key) if not scriptEnabled then return false end if type(keypress) ~= "function" or type(keyrelease) ~= "function" then warn( "[TeleportLock] keypress/keyrelease is unavailable in this executor." ) return false end local keyValue = key.Value -- Press keypress(keyValue) -- Short hold task.wait(0.01) -- Release keyrelease(keyValue) return true end --==================================================-- -- SEND MULTIPLE MACRO KEYS SIMULTANEOUSLY --==================================================-- local function pressMacroKeysSimultaneously(keys) if not scriptEnabled then return false end if not keys or #keys == 0 then return false end if type(keypress) ~= "function" or type(keyrelease) ~= "function" then warn( "[TeleportLock] keypress/keyrelease is unavailable in this executor." ) return false end print( "[Macro] SIMULTANEOUS KEY GROUP START" ) --================================================-- -- PRESS ALL KEYS FIRST --================================================-- for _, key in ipairs(keys) do if not scriptEnabled then return false end keypress( key.Value ) print( "[Macro] Key DOWN:", key.Name ) end --================================================-- -- ALL KEYS ARE NOW HELD --================================================-- task.wait(0.01) --================================================-- -- RELEASE ALL KEYS --================================================== for _, key in ipairs(keys) do keyrelease( key.Value ) print( "[Macro] Key UP:", key.Name ) end print( "[Macro] SIMULTANEOUS KEY GROUP END" ) return true end --==================================================-- -- HIGHSPEED RUSH DIAGNOSTIC --==================================================-- local function diagnoseHighspeedRush(target) if not scriptEnabled then return false end if not target then setDiagnostic( "FAILED", "NONE", "--", "--", "No locked target." ) return false end local character = target.Character if not character then setDiagnostic( "FAILED", target.Name, "--", "--", "Target character unavailable." ) return false end local targetRoot = character:FindFirstChild( "HumanoidRootPart" ) local humanoid = character:FindFirstChildOfClass( "Humanoid" ) if not targetRoot then setDiagnostic( "FAILED", target.Name, "--", "--", "Target root unavailable." ) return false end if not humanoid then setDiagnostic( "FAILED", target.Name, "--", "--", "Target humanoid unavailable." ) return false end local myCharacter = player.Character local myRoot = myCharacter and myCharacter:FindFirstChild( "HumanoidRootPart" ) if not myRoot then setDiagnostic( "FAILED", target.Name, string.format( "%.1f", humanoid.Health ), "--", "Your character root unavailable." ) return false end local startingHealth = humanoid.Health local startingDistance = (myRoot.Position - targetRoot.Position).Magnitude setDiagnostic( "CHECKING", target.Name, string.format( "%.1f -> %.1f", startingHealth, startingHealth ), string.format( "%.1f", startingDistance ), "Watching Highspeed Rush..." ) print( "[RushCheck] Starting health:", startingHealth ) print( "[RushCheck] Starting distance:", startingDistance ) local elapsed = 0 while elapsed < RUSH_CHECK_WINDOW do if not scriptEnabled then return false end if lockedTarget ~= target then setDiagnostic( "FAILED", target.Name, "--", "--", "Locked target changed." ) return false end character = target.Character if not character then setDiagnostic( "FAILED", target.Name, "--", "--", "Target disappeared." ) return false end targetRoot = character:FindFirstChild( "HumanoidRootPart" ) humanoid = character:FindFirstChildOfClass( "Humanoid" ) myCharacter = player.Character myRoot = myCharacter and myCharacter:FindFirstChild( "HumanoidRootPart" ) if not targetRoot or not humanoid or not myRoot then task.wait( RUSH_CHECK_INTERVAL ) elapsed = elapsed + RUSH_CHECK_INTERVAL continue end local currentHealth = humanoid.Health local currentDistance = (myRoot.Position - targetRoot.Position).Magnitude local healthChanged = currentHealth < startingHealth local distanceClosed = currentDistance <= DISTANCE_SUCCESS_THRESHOLD local details = "Waiting for confirmed hit..." if healthChanged then details = "Health decreased - HIT CONFIRMED." end setDiagnostic( "CHECKING", target.Name, string.format( "%.1f -> %.1f", startingHealth, currentHealth ), string.format( "%.1f", currentDistance ), details ) if REQUIRE_HEALTH_CHANGE and healthChanged then setDiagnostic( "SUCCESS", target.Name, string.format( "%.1f -> %.1f", startingHealth, currentHealth ), string.format( "%.1f", currentDistance ), "Highspeed Rush landed." ) print( "[RushCheck] SUCCESS - health changed." ) return true end if not REQUIRE_HEALTH_CHANGE and distanceClosed then setDiagnostic( "SUCCESS", target.Name, string.format( "%.1f -> %.1f", startingHealth, currentHealth ), string.format( "%.1f", currentDistance ), "Rush reached target distance." ) return true end task.wait( RUSH_CHECK_INTERVAL ) elapsed = elapsed + RUSH_CHECK_INTERVAL end local finalHealth = humanoid and humanoid.Health or startingHealth local finalDistance = "--" if targetRoot and myRoot then finalDistance = string.format( "%.1f", (myRoot.Position - targetRoot.Position).Magnitude ) end setDiagnostic( "FAILED", target.Name, string.format( "%.1f -> %.1f", startingHealth, finalHealth ), finalDistance, "NO confirmed hit. Macro stopped." ) print( "[RushCheck] FAILED - no confirmed hit." ) return false end --==================================================-- -- POST-STEP-1 TARGET TELEPORT + SHORT FOLLOW -- Wait 150 ms after macrostep 1's in-game teleport before the fake TP starts. local STEP1_FAKE_TP_START_DELAY = 0.150 -- Keep the fake TP follow active for 150 ms after it starts. local STEP1_TELEPORT_TRACK_DURATION = 0.150 -- Stay three studs behind the target instead of overlapping its character. local STEP1_TELEPORT_TARGET_OFFSET = CFrame.new(0, 0, 3) local function teleportAndTrackTarget(target, duration) if not scriptEnabled or not target or lockedTarget ~= target then return false end local startedAt = os.clock() local movedAtLeastOnce = false while scriptEnabled and lockedTarget == target and (os.clock() - startedAt) < duration do local targetCharacter = target.Character local targetRoot = targetCharacter and targetCharacter:FindFirstChild("HumanoidRootPart") local myCharacter = player.Character local myHumanoid = myCharacter and myCharacter:FindFirstChildOfClass("Humanoid") local myRoot = myCharacter and myCharacter:FindFirstChild("HumanoidRootPart") if not targetRoot or not myCharacter or not myHumanoid or myHumanoid.Health <= 0 or not myRoot then warn("[Macro] Step 1 teleport tracking stopped: character/root unavailable.") return false end -- Refresh the destination every frame to follow target movement. local destination = targetRoot.CFrame * STEP1_TELEPORT_TARGET_OFFSET myCharacter:PivotTo(destination) movedAtLeastOnce = true RunService.Heartbeat:Wait() end if movedAtLeastOnce then print(string.format( "[Macro] Step 1 teleport/follow completed for %s (%.0f ms).", tostring(target.Name), duration * 1000 )) end return movedAtLeastOnce and scriptEnabled and lockedTarget == target end -- RUN MACRO --==================================================-- local function runMacro(startIndex) startIndex = startIndex or 1 if not scriptEnabled then return end if macroRunning then return end if not lockedTarget then setDiagnostic( "IDLE", "NONE", "--", "--", "Macro cancelled: no target." ) print( "[Macro] No locked target." ) return end macroRunning = true local step2HealthBaseline = nil local step2HealthTarget = nil print( "[Macro] START" ) task.wait(0.001) for index = startIndex, #macroSteps do local step = macroSteps[index] if not scriptEnabled then break end if not lockedTarget then print( "[Macro] Target lost." ) break end --================================================-- -- KEY 1 -> KEY 2 TRANSITION --================================================-- local key1TransitionStart = nil if step.key == Enum.KeyCode.One and index < #macroSteps then -- Keep continuous tracking active during: -- Key 1 -- dynamic 1 -> 2 timing -- until Keys 3-7 are actually pressed. mouseTrackingCritical = true local aimX, aimY = getTargetMousePosition() if not aimX or not aimY or type(mousemoveabs) ~= "function" then mouseTrackingCritical = false print( "[Macro] Step 1 cancelled: target mouse position unavailable." ) break end moveMouseAbsolute( aimX, aimY ) -- Refresh once more immediately before Key 1. local finalAimX, finalAimY = getTargetMousePosition() if finalAimX and finalAimY then moveMouseAbsolute( finalAimX, finalAimY ) else mouseTrackingCritical = false print( "[Macro] Step 1 cancelled: target moved off-screen before key 1." ) break end key1TransitionStart = os.clock() end --================================================-- -- SINGLE KEY OR SIMULTANEOUS KEY GROUP --================================================-- local pressed = false if step.keys then --================================================-- -- CAPTURE HEALTH BASELINE BEFORE KEYS 3-7 --================================================-- if index == 3 then step2HealthTarget = lockedTarget local baselineCharacter = step2HealthTarget and step2HealthTarget.Character local baselineHumanoid = baselineCharacter and baselineCharacter:FindFirstChildOfClass("Humanoid") if baselineHumanoid then step2HealthBaseline = baselineHumanoid.Health print( "[Macro] Keys 3-7 health baseline:", step2HealthBaseline ) else step2HealthBaseline = nil print( "[Macro] Keys 3-7 health check unavailable: target humanoid missing." ) end end print( "[Macro] Pressing simultaneous group:", index, "Keys 3-7" ) pressed = pressMacroKeysSimultaneously( step.keys ) elseif step.key then local repeatCount = step.repeats or 1 print( "[Macro] Pressing:", index, step.key.Name, "x" .. tostring(repeatCount) ) for repeatIndex = 1, repeatCount do if not scriptEnabled then break end pressed = pressMacroKey( step.key ) if not pressed then print( "[Macro] Could not press:", index, "repeat", repeatIndex ) break end if repeatIndex < repeatCount and step.delayAfter > 0 then task.wait( step.delayAfter ) end end end if not pressed then print( "[Macro] Could not press:", index ) break end if step.key == Enum.KeyCode.One then -- Let macrostep 1's in-game teleport finish first. -- Start the fake TP 150 ms later, then follow the target -- for the existing 150 ms tracking duration. task.wait(STEP1_FAKE_TP_START_DELAY) local step1Target = lockedTarget local teleportTracked = teleportAndTrackTarget( step1Target, STEP1_TELEPORT_TRACK_DURATION ) if not teleportTracked then print("[Macro] Step 1 teleport/follow failed or target changed; stopping sequence.") break end -- Preserve sub-frame precision for very short delays, but yield for -- longer delays so the configured wait does not freeze this Luau thread. local transitionStart = os.clock() local fixedDelaySeconds = FIXED_KEY1_TO_KEY2_DELAY_MS / 1000 if fixedDelaySeconds > 0.01 then task.wait(fixedDelaySeconds) else while (os.clock() - transitionStart) < fixedDelaySeconds do end end lastAppliedTransitionMs = (os.clock() - transitionStart) * 1000 transitionSamples = transitionSamples + 1 timingStatus = "FIXED / APPLIED" end --================================================-- -- STEP 2 HEALTH CONFIRMATION GATE --================================================-- if index == 3 and step.keys then local healthConfirmed = false local healthElapsed = 0 if step2HealthBaseline and step2HealthTarget then print( "[Macro] Keys 3-7 HIT CHECK: waiting for health reduction..." ) while healthElapsed < STEP2_HEALTH_CHECK_WINDOW do if not scriptEnabled then break end if lockedTarget ~= step2HealthTarget then print( "[Macro] Keys 3-7 HIT CHECK FAILED: target changed." ) break end local checkCharacter = step2HealthTarget.Character local checkHumanoid = checkCharacter and checkCharacter:FindFirstChildOfClass("Humanoid") if checkHumanoid then local currentStep2Health = checkHumanoid.Health if currentStep2Health < step2HealthBaseline then healthConfirmed = true print( "[Macro] Keys 3-7 HIT CONFIRMED:", step2HealthBaseline, "->", currentStep2Health ) break end else print( "[Macro] Keys 3-7 HIT CHECK FAILED: target humanoid missing." ) break end task.wait(STEP2_HEALTH_CHECK_INTERVAL) healthElapsed = healthElapsed + STEP2_HEALTH_CHECK_INTERVAL end end if not healthConfirmed then local finalStep2Health = step2HealthBaseline if step2HealthTarget and step2HealthTarget.Character then local finalStep2Humanoid = step2HealthTarget.Character:FindFirstChildOfClass("Humanoid") if finalStep2Humanoid then finalStep2Health = finalStep2Humanoid.Health end end setDiagnostic( "FAILED", step2HealthTarget and step2HealthTarget.Name or "NONE", string.format( "%.1f -> %.1f", step2HealthBaseline or 0, finalStep2Health or 0 ), "--", "Keys 3-7 caused no confirmed health reduction. Macro stopped." ) print( "[Macro] Keys 3-7 HIT CHECK FAILED - macro hard stopped." ) break end end --================================================-- -- KEEP TRACKING THROUGH THE MACRO --================================================-- if step.keys then print( "[Macro] Keys 3-7 completed." ) print( "[Mouse] Continuous target tracking remains active." ) --================================================-- -- HIGHSPEED RUSH CHECKPOINT --================================================-- print( "[Macro] Highspeed Rush CHECKPOINT." ) local rushTarget = lockedTarget local success = diagnoseHighspeedRush( rushTarget ) if not success then print( "[Macro] Highspeed Rush MISSED." ) print( "[Macro] HARD STOP." ) break end print( "[Macro] Highspeed Rush SUCCESS." ) end end macroRunning = false -- Safety cleanup in case the macro exits early. stopMouseTracking() --==================================================-- -- RESTORE ORIGINAL MOUSE POSITION --==================================================-- if scriptEnabled and savedMousePosition and type(mousemoveabs) == "function" then moveMouseAbsolute( math.round(savedMousePosition.X), math.round(savedMousePosition.Y) ) end savedMousePosition = nil busy = false if scriptEnabled then print( "[Macro] FINISHED" ) else print( "[Macro] CANCELLED" ) end end --==================================================-- -- AUTO MACRO: DISTANCE / TELEPORT-SAFE TRIGGER --==================================================-- local AUTO_MACRO_SPAM_INTERVAL = 0.03 local AUTO_MACRO_MISSING_ROOT_GRACE = 0.35 local autoMacroRunning = false local autoMacroPending = false local autoMacroWorkerTarget = nil local function getAutoMacroState() -- Auto Macro must ONLY run while the game's live lock-on UI confirms -- that the currently selected target is actually locked. if not scriptEnabled or not lockedTarget then return nil, nil end local target = lockedTarget -- The initial target scan can find a candidate before a fresh lock event -- occurs. If the script starts while the game is already locked, confirm -- that lock from the live reticle and its BillboardGui before enabling -- Auto Macro. Never infer a lock from distance or proximity alone. if not targetLockActive then local interface = playerGui:FindFirstChild("LockedOnInterface") local reticle = interface and interface:FindFirstChild("Reticle", true) if not interface or not reticle or not reticle:IsA("GuiObject") or not reticle.Visible then return nil, nil end local billboard = reticle:FindFirstAncestorWhichIsA("BillboardGui") if not billboard or not billboard.Enabled or not billboard.Adornee then return nil, nil end local targetCharacter = target.Character local targetRoot = targetCharacter and targetCharacter:FindFirstChild("HumanoidRootPart") if not targetCharacter or not targetRoot then return nil, nil end -- Require the live lock reticle to be attached to this exact target's -- character. A visible reticle for another entity must not qualify. if not billboard.Adornee:IsA("BasePart") or not billboard.Adornee:IsDescendantOf(targetCharacter) then return nil, nil end -- Respect hidden/disabled GUI ancestors as well as the reticle itself. local ancestor = reticle.Parent while ancestor and ancestor ~= interface do if ancestor:IsA("GuiObject") and not ancestor.Visible then return nil, nil end ancestor = ancestor.Parent end targetLockActive = true autoMacroLockGeneration = (autoMacroLockGeneration or 0) + 1 print("[AutoMacro] Existing live target lock confirmed from reticle.") end -- Re-check the lock state after confirmation and before measuring range. if not targetLockActive or lockedTarget ~= target then return nil, nil end local myCharacter = player.Character local myRoot = myCharacter and myCharacter:FindFirstChild("HumanoidRootPart") local targetCharacter = target.Character local targetRoot = targetCharacter and targetCharacter:FindFirstChild("HumanoidRootPart") local targetHumanoid = targetCharacter and targetCharacter:FindFirstChildOfClass("Humanoid") if not myRoot or not targetRoot or not targetHumanoid or targetHumanoid.Health <= 0 then return target, nil end return target, (myRoot.Position - targetRoot.Position).Magnitude end local function runAutoMacroSpam(target) if autoMacroRunning or busy or not scriptEnabled or not target then autoMacroPending = false return end autoMacroRunning = true autoMacroPending = false autoMacroWorkerTarget = target local ok, err = xpcall(function() local currentTarget, initialDistance = getAutoMacroState() if currentTarget ~= target or not initialDistance or initialDistance > AUTO_MACRO_DISTANCE then print("[AutoMacro] Trigger cancelled: target was no longer inside range when worker started.") return end print(string.format( "[AutoMacro] STARTED for %s at %.1f studs (range %.1f).", tostring(target.Name), initialDistance, AUTO_MACRO_DISTANCE )) local missingRootSince = nil while scriptEnabled and not busy and targetLockActive and lockedTarget == target do local currentTarget, distance = getAutoMacroState() if currentTarget ~= target then print("[AutoMacro] Stopped: locked target changed.") break end if distance == nil then -- Character/root replication can briefly disappear during a -- teleport or respawn. Retry instead of instantly killing the worker. missingRootSince = missingRootSince or os.clock() if os.clock() - missingRootSince > AUTO_MACRO_MISSING_ROOT_GRACE then print("[AutoMacro] Stopped: target/root unavailable for too long.") break end task.wait(0.01) continue end missingRootSince = nil if distance > AUTO_MACRO_DISTANCE then print(string.format( "[AutoMacro] Stopped: target left range (%.1f studs).", distance )) break end local pressed, pressError = pcall(function() return pressMacroKeysSimultaneously({ Enum.KeyCode.Two, Enum.KeyCode.Three, Enum.KeyCode.Four, Enum.KeyCode.Five, Enum.KeyCode.Six, Enum.KeyCode.Seven, Enum.KeyCode.Eight, Enum.KeyCode.Nine }) end) if not pressed then warn("[AutoMacro] Key press error:", pressError) break end task.wait(AUTO_MACRO_SPAM_INTERVAL) end end, debug.traceback) if not ok then warn("[AutoMacro] Worker crashed:\n" .. tostring(err)) end -- Always release the worker lock, including when an executor input call errors. autoMacroRunning = false autoMacroPending = false autoMacroWorkerTarget = nil print("[AutoMacro] Worker finished; trigger is monitoring again.") end local function startAutoMacroTrigger() if autoMacroConnection then autoMacroConnection:Disconnect() autoMacroConnection = nil end autoMacroConnection = RunService.Heartbeat:Connect(function() if not scriptEnabled or busy or autoMacroRunning or autoMacroPending then return end local target, distance = getAutoMacroState() -- This is an IN-RANGE check, not an approach/crossing check. -- Therefore a one-frame teleport from outside to inside the range -- is enough to queue the worker on the next Heartbeat. if target and distance and distance <= AUTO_MACRO_DISTANCE then autoMacroPending = true autoMacroTarget = target print(string.format( "[AutoMacro] RANGE DETECTED: %s at %.1f studs; starting worker.", tostring(target.Name), distance )) task.spawn(runAutoMacroSpam, target) end end) end startAutoMacroTrigger() UserInputService.InputBegan:Connect(function(input) if not scriptEnabled then return end -- Do not reject game-processed keyboard events: Roblox may mark F as -- processed because the game also binds it. Still avoid capturing typing. if UserInputService:GetFocusedTextBox() then return end if input.UserInputType ~= Enum.UserInputType.Keyboard or input.KeyCode ~= Enum.KeyCode.F then return end local shiftHeld = UserInputService:IsKeyDown(Enum.KeyCode.LeftShift) or UserInputService:IsKeyDown(Enum.KeyCode.RightShift) if not shiftHeld then return end if macroRunning or busy then print("[TeleportLock] Shift+F ignored: a sequence is already running.") return end if not lockedTarget then warn("[TeleportLock] Shift+F not started: no target was detected.") return end local character, root = getTargetCharacter() if not character or not root then warn("[TeleportLock] Shift+F not started: target character/root is unavailable.") return end local x, y = getTargetMousePosition() if not x or not y then warn("[TeleportLock] Shift+F not started: the game's target reticle is unavailable or off-screen.") return end if type(mousemoveabs) ~= "function" then warn("[TeleportLock] Shift+F not started: mousemoveabs is unavailable in this executor.") return end -- Acquire the manual-sequence lock before yielding or scheduling work. busy = true savedMousePosition = UserInputService:GetMouseLocation() print(string.format( "[TeleportLock] Shift+F accepted for %s at screen position %d, %d.", tostring(lockedTarget.Name), x, y )) local aimOk, aimError = pcall(moveMouseAbsolute, x, y) if not aimOk then warn("[TeleportLock] Initial aim failed: " .. tostring(aimError)) savedMousePosition = nil busy = false return end startMouseTracking() -- Run in a protected worker so every exit path releases the busy lock, -- tracking connection, and saved cursor position. Wait briefly for an -- already-running Auto Macro key burst to release its keys first. task.spawn(function() local waitDeadline = os.clock() + 0.5 while scriptEnabled and autoMacroRunning and os.clock() < waitDeadline do task.wait(0.01) end if not scriptEnabled then stopMouseTracking() savedMousePosition = nil macroRunning = false busy = false return end if autoMacroRunning then warn("[TeleportLock] Shift+F cancelled: Auto Macro did not release its key worker.") else local ok, err = xpcall(function() runMacro() end, debug.traceback) if not ok then warn("[TeleportLock] Shift+F sequence crashed:\n" .. tostring(err)) end end -- runMacro normally performs this cleanup itself. This fallback also -- handles early returns and runtime errors without changing the steps. if busy then stopMouseTracking() if scriptEnabled and savedMousePosition and type(mousemoveabs) == "function" then local restoreOk, restoreError = pcall( moveMouseAbsolute, math.round(savedMousePosition.X), math.round(savedMousePosition.Y) ) if not restoreOk then warn("[TeleportLock] Cursor restore failed: " .. tostring(restoreError)) end end savedMousePosition = nil macroRunning = false busy = false end end) end) --==================================================-- -- HITBOX EXPANDER + CONNECTED PLAYER VISUALS -- Integrated from Silent_aim_keyless; independent of target/macro logic. --==================================================-- local HttpService = game:GetService("HttpService") local Lighting = game:GetService("Lighting") local hitboxState = { enabled = false, size = 5, esp = false, hideHead = false, tracers = false, chams = false, fullbright = false, enemiesOnly = false, targetEveryone = false, antiHitEnabled = false, antiHitSpeed = 50, } local hitboxOverrides = {} local hitboxPlayerConnections = {} local hitboxTracerObjects = {} local hitboxThemeColor = Color3.fromRGB(120, 190, 255) local hitboxConfigFile = "CurrentDynamic_HitboxConfig.json" local hitboxOriginalLighting = { Ambient = Lighting.Ambient, OutdoorAmbient = Lighting.OutdoorAmbient, } local hitboxPanel local hitboxPlayerList local hitboxSearchBox local hitboxSearchConnection local hitboxStatusLabel local hitboxSizeBox local antiHitSpeedBox local hitboxRefreshPlayerList local hitboxApplyAll local antiHitRestoreRotation local function hitboxIsEnemy(targetPlayer) if targetPlayer == player then return false end if hitboxState.targetEveryone then return true end if player.Team ~= nil and targetPlayer.Team ~= nil then return player.Team ~= targetPlayer.Team end if player.TeamColor ~= nil and targetPlayer.TeamColor ~= nil then return player.TeamColor ~= targetPlayer.TeamColor end return true end local function hitboxRestoreCharacter(targetPlayer, character) if not character then return end local root = character:FindFirstChild("HumanoidRootPart") if root and root:GetAttribute("CD_Hitbox_OrigSize") then pcall(function() root.Size = root:GetAttribute("CD_Hitbox_OrigSize") root.Transparency = root:GetAttribute("CD_Hitbox_OrigTransparency") root.Color = root:GetAttribute("CD_Hitbox_OrigColor") local materialName = root:GetAttribute("CD_Hitbox_OrigMaterial") if materialName then root.Material = Enum.Material[materialName] or Enum.Material.Plastic end root.CanCollide = root:GetAttribute("CD_Hitbox_OrigCanCollide") end) end local head = character:FindFirstChild("Head") if head then local originalTransparency = head:GetAttribute("CD_Hitbox_HeadTransparency") if originalTransparency ~= nil then pcall(function() head.Transparency = originalTransparency end) end for _, child in ipairs(head:GetChildren()) do if child:IsA("Decal") or child:IsA("SpecialMesh") then local original = child:GetAttribute("CD_Hitbox_DecalTransparency") if original ~= nil then pcall(function() child.Transparency = original end) end end end end for _, part in ipairs(character:GetDescendants()) do if part:IsA("BasePart") and part ~= root then local originalMaterial = part:GetAttribute("CD_Hitbox_OrigMaterial") if originalMaterial then pcall(function() part.Material = Enum.Material[originalMaterial] or Enum.Material.Plastic end) end end end local highlight = character:FindFirstChild("CD_Hitbox_ESP") if highlight then highlight:Destroy() end end local function hitboxProcessCharacter(targetPlayer, character) if not scriptEnabled or not character or targetPlayer == player then return end local root = character:FindFirstChild("HumanoidRootPart") local head = character:FindFirstChild("Head") local enemy = hitboxIsEnemy(targetPlayer) if head then if head:GetAttribute("CD_Hitbox_HeadTransparency") == nil then head:SetAttribute("CD_Hitbox_HeadTransparency", head.Transparency) end if hitboxState.hideHead then head.Transparency = 1 for _, child in ipairs(head:GetChildren()) do if child:IsA("Decal") or child:IsA("SpecialMesh") then if child:GetAttribute("CD_Hitbox_DecalTransparency") == nil then child:SetAttribute("CD_Hitbox_DecalTransparency", child.Transparency) end child.Transparency = 1 end end else local original = head:GetAttribute("CD_Hitbox_HeadTransparency") if original ~= nil then head.Transparency = original end for _, child in ipairs(head:GetChildren()) do if child:IsA("Decal") or child:IsA("SpecialMesh") then local decalOriginal = child:GetAttribute("CD_Hitbox_DecalTransparency") if decalOriginal ~= nil then child.Transparency = decalOriginal end end end end end if root then if root:GetAttribute("CD_Hitbox_OrigSize") == nil then root:SetAttribute("CD_Hitbox_OrigSize", root.Size) root:SetAttribute("CD_Hitbox_OrigTransparency", root.Transparency) root:SetAttribute("CD_Hitbox_OrigColor", root.Color) root:SetAttribute("CD_Hitbox_OrigMaterial", root.Material.Name) root:SetAttribute("CD_Hitbox_OrigCanCollide", root.CanCollide) end local allowHitbox = hitboxState.enabled if hitboxOverrides[targetPlayer] ~= nil then allowHitbox = hitboxState.enabled and hitboxOverrides[targetPlayer] end if allowHitbox then root.Size = Vector3.new(hitboxState.size, hitboxState.size, hitboxState.size) root.Transparency = 0.6 root.Color = hitboxThemeColor root.Material = Enum.Material.Neon root.CanCollide = false else pcall(function() root.Size = root:GetAttribute("CD_Hitbox_OrigSize") root.Transparency = root:GetAttribute("CD_Hitbox_OrigTransparency") root.Color = root:GetAttribute("CD_Hitbox_OrigColor") local materialName = root:GetAttribute("CD_Hitbox_OrigMaterial") if materialName then root.Material = Enum.Material[materialName] or Enum.Material.Plastic end root.CanCollide = root:GetAttribute("CD_Hitbox_OrigCanCollide") end) end end for _, part in ipairs(character:GetDescendants()) do if part:IsA("BasePart") and part ~= root then if hitboxState.chams then if part:GetAttribute("CD_Hitbox_OrigMaterial") == nil then part:SetAttribute("CD_Hitbox_OrigMaterial", part.Material.Name) end part.Material = Enum.Material.Neon else local originalMaterial = part:GetAttribute("CD_Hitbox_OrigMaterial") if originalMaterial then pcall(function() part.Material = Enum.Material[originalMaterial] or Enum.Material.Plastic end) end end end end local highlight = character:FindFirstChild("CD_Hitbox_ESP") if hitboxState.esp then if not highlight then highlight = Instance.new("Highlight") highlight.Name = "CD_Hitbox_ESP" highlight.Adornee = character highlight.FillTransparency = 0.5 highlight.OutlineTransparency = 0 highlight.DepthMode = Enum.HighlightDepthMode.AlwaysOnTop highlight.Parent = character end highlight.Enabled = true highlight.Adornee = character if enemy then highlight.FillColor = Color3.fromRGB(255, 55, 65) highlight.OutlineColor = Color3.fromRGB(255, 110, 110) else highlight.FillColor = Color3.fromRGB(40, 220, 130) highlight.OutlineColor = Color3.fromRGB(100, 255, 175) end elseif highlight then highlight:Destroy() end end hitboxApplyAll = function() if not scriptEnabled then return end for _, targetPlayer in ipairs(Players:GetPlayers()) do if targetPlayer ~= player and targetPlayer.Character then hitboxProcessCharacter(targetPlayer, targetPlayer.Character) end end if hitboxStatusLabel and hitboxStatusLabel.Parent then hitboxStatusLabel.Text = string.format( "Hitbox: %s | Size: %s | Players: %d", hitboxState.enabled and "ON" or "OFF", tostring(hitboxState.size), math.max(0, #Players:GetPlayers() - 1) ) end end local function hitboxSaveConfig() if type(writefile) ~= "function" then return end pcall(function() writefile(hitboxConfigFile, HttpService:JSONEncode(hitboxState)) end) end local function hitboxLoadConfig() if type(readfile) ~= "function" or type(isfile) ~= "function" then return end local ok, config = pcall(function() if not isfile(hitboxConfigFile) then return nil end return HttpService:JSONDecode(readfile(hitboxConfigFile)) end) if ok and type(config) == "table" then for key, defaultValue in pairs(hitboxState) do if config[key] ~= nil and type(config[key]) == type(defaultValue) then hitboxState[key] = config[key] end end hitboxState.size = math.clamp(tonumber(hitboxState.size) or 5, 1, 120) hitboxState.antiHitSpeed = math.clamp(tonumber(hitboxState.antiHitSpeed) or 50, 1, 1000) end end local function hitboxMakeButton(parent, label, callback, height) local button = Instance.new("TextButton") button.Size = UDim2.new(1, 0, 0, height or 28) button.BackgroundColor3 = Color3.fromRGB(39, 45, 58) button.BorderSizePixel = 0 button.Text = label button.TextColor3 = Color3.fromRGB(240, 243, 250) button.TextSize = 12 button.Font = Enum.Font.GothamSemibold button.AutoButtonColor = true button.Parent = parent local corner = Instance.new("UICorner") corner.CornerRadius = UDim.new(0, 6) corner.Parent = button button.MouseButton1Click:Connect(callback) return button end local function hitboxRefreshControls() if not hitboxPanel then return end for _, item in ipairs(hitboxPanel:GetDescendants()) do if item:IsA("TextButton") and item:GetAttribute("HitboxControlKey") then local key = item:GetAttribute("HitboxControlKey") item.Text = (hitboxState[key] and "ON | " or "OFF | ") .. item:GetAttribute("HitboxControlLabel") item.BackgroundColor3 = hitboxState[key] and Color3.fromRGB(25, 105, 78) or Color3.fromRGB(39, 45, 58) end end if hitboxSizeBox then hitboxSizeBox.Text = tostring(hitboxState.size) end if antiHitSpeedBox then antiHitSpeedBox.Text = tostring(hitboxState.antiHitSpeed) end if hitboxRefreshPlayerList then hitboxRefreshPlayerList() end end hitboxLoadConfig() -- Compact control panel; it lives inside the existing ScreenGui and follows H hide/show. hitboxPanel = Instance.new("Frame") hitboxPanel.Name = "CurrentDynamicHitboxPanel" hitboxPanel.Size = UDim2.fromOffset(275, 430) hitboxPanel.Position = UDim2.new(0, 14, 0, 82) hitboxPanel.BackgroundColor3 = Color3.fromRGB(17, 21, 30) hitboxPanel.BackgroundTransparency = 0.04 hitboxPanel.BorderSizePixel = 0 hitboxPanel.Parent = gui local panelCorner = Instance.new("UICorner") panelCorner.CornerRadius = UDim.new(0, 10) panelCorner.Parent = hitboxPanel local panelStroke = Instance.new("UIStroke") panelStroke.Color = hitboxThemeColor panelStroke.Thickness = 1.2 panelStroke.Parent = hitboxPanel local panelTitle = Instance.new("TextLabel") panelTitle.Size = UDim2.new(1, -42, 0, 30) panelTitle.Position = UDim2.fromOffset(10, 5) panelTitle.BackgroundTransparency = 1 panelTitle.Text = "HITBOX / PLAYER VISUALS" panelTitle.TextColor3 = hitboxThemeColor panelTitle.TextSize = 13 panelTitle.Font = Enum.Font.GothamBold panelTitle.TextXAlignment = Enum.TextXAlignment.Left panelTitle.Parent = hitboxPanel local panelHide = Instance.new("TextButton") panelHide.Size = UDim2.fromOffset(25, 25) panelHide.Position = UDim2.new(1, -32, 0, 7) panelHide.BackgroundColor3 = Color3.fromRGB(55, 60, 75) panelHide.Text = "–" panelHide.TextColor3 = Color3.new(1, 1, 1) panelHide.TextSize = 18 panelHide.Font = Enum.Font.GothamBold panelHide.Parent = hitboxPanel panelHide.MouseButton1Click:Connect(function() hitboxPanel.Visible = false end) local panelShow = Instance.new("TextButton") panelShow.Name = "ShowHitboxPanel" panelShow.Size = UDim2.fromOffset(128, 27) panelShow.Position = UDim2.new(0, 14, 0, 48) panelShow.BackgroundColor3 = Color3.fromRGB(32, 75, 105) panelShow.BorderSizePixel = 0 panelShow.Text = "SHOW HITBOX PANEL" panelShow.TextColor3 = Color3.new(1, 1, 1) panelShow.TextSize = 11 panelShow.Font = Enum.Font.GothamBold panelShow.Parent = gui local panelShowCorner = Instance.new("UICorner") panelShowCorner.CornerRadius = UDim.new(0, 6) panelShowCorner.Parent = panelShow panelShow.MouseButton1Click:Connect(function() hitboxPanel.Visible = not hitboxPanel.Visible end) local panelContent = Instance.new("ScrollingFrame") panelContent.Size = UDim2.new(1, -16, 1, -43) panelContent.Position = UDim2.fromOffset(8, 37) panelContent.BackgroundTransparency = 1 panelContent.BorderSizePixel = 0 panelContent.ScrollBarThickness = 3 panelContent.CanvasSize = UDim2.new(0, 0, 0, 0) panelContent.Parent = hitboxPanel local panelLayout = Instance.new("UIListLayout") panelLayout.Padding = UDim.new(0, 5) panelLayout.SortOrder = Enum.SortOrder.LayoutOrder panelLayout.Parent = panelContent local panelPadding = Instance.new("UIPadding") panelPadding.PaddingBottom = UDim.new(0, 7) panelPadding.Parent = panelContent panelLayout:GetPropertyChangedSignal("AbsoluteContentSize"):Connect(function() panelContent.CanvasSize = UDim2.new(0, 0, 0, panelLayout.AbsoluteContentSize.Y + 10) end) hitboxStatusLabel = Instance.new("TextLabel") hitboxStatusLabel.Size = UDim2.new(1, 0, 0, 22) hitboxStatusLabel.BackgroundTransparency = 1 hitboxStatusLabel.Text = "Hitbox: OFF" hitboxStatusLabel.TextColor3 = Color3.fromRGB(205, 215, 230) hitboxStatusLabel.TextSize = 10 hitboxStatusLabel.Font = Enum.Font.Code hitboxStatusLabel.TextXAlignment = Enum.TextXAlignment.Left hitboxStatusLabel.Parent = panelContent local function hitboxAddToggle(key, label) local button button = hitboxMakeButton(panelContent, "", function() hitboxState[key] = not hitboxState[key] if key == "antiHitEnabled" and not hitboxState.antiHitEnabled and antiHitRestoreRotation then antiHitRestoreRotation() end if key == "fullbright" then if hitboxState.fullbright then Lighting.Ambient = Color3.new(1, 1, 1) Lighting.OutdoorAmbient = Color3.new(1, 1, 1) else Lighting.Ambient = hitboxOriginalLighting.Ambient Lighting.OutdoorAmbient = hitboxOriginalLighting.OutdoorAmbient end end hitboxApplyAll() hitboxRefreshControls() hitboxSaveConfig() end) button:SetAttribute("HitboxControlKey", key) button:SetAttribute("HitboxControlLabel", label) return button end hitboxAddToggle("enabled", "HITBOX EXPANDER") hitboxAddToggle("antiHitEnabled", "ANTI HIT") -- G or Shift+G toggles Anti Hit. Ignore input while the user is typing. UserInputService.InputBegan:Connect(function(input) if not scriptEnabled or input.UserInputType ~= Enum.UserInputType.Keyboard then return end if input.KeyCode ~= Enum.KeyCode.G or UserInputService:GetFocusedTextBox() then return end hitboxState.antiHitEnabled = not hitboxState.antiHitEnabled if not hitboxState.antiHitEnabled and antiHitRestoreRotation then antiHitRestoreRotation() end hitboxApplyAll() hitboxRefreshControls() hitboxSaveConfig() end) local antiHitSpeedRow = Instance.new("Frame") antiHitSpeedRow.Size = UDim2.new(1, 0, 0, 30) antiHitSpeedRow.BackgroundTransparency = 1 antiHitSpeedRow.Parent = panelContent local antiHitSpeedLabel = Instance.new("TextLabel") antiHitSpeedLabel.Size = UDim2.new(0.55, 0, 1, 0) antiHitSpeedLabel.BackgroundTransparency = 1 antiHitSpeedLabel.Text = "ANTI HIT SPEED" antiHitSpeedLabel.TextColor3 = Color3.fromRGB(225, 230, 240) antiHitSpeedLabel.TextSize = 10 antiHitSpeedLabel.Font = Enum.Font.GothamBold antiHitSpeedLabel.TextXAlignment = Enum.TextXAlignment.Left antiHitSpeedLabel.Parent = antiHitSpeedRow antiHitSpeedBox = Instance.new("TextBox") antiHitSpeedBox.Size = UDim2.new(0.42, 0, 1, 0) antiHitSpeedBox.Position = UDim2.new(0.58, 0, 0, 0) antiHitSpeedBox.BackgroundColor3 = Color3.fromRGB(35, 42, 56) antiHitSpeedBox.BorderSizePixel = 0 antiHitSpeedBox.Text = tostring(hitboxState.antiHitSpeed) antiHitSpeedBox.PlaceholderText = "1–1000" antiHitSpeedBox.TextColor3 = hitboxThemeColor antiHitSpeedBox.TextSize = 12 antiHitSpeedBox.Font = Enum.Font.GothamBold antiHitSpeedBox.ClearTextOnFocus = false antiHitSpeedBox.Parent = antiHitSpeedRow local antiHitSpeedCorner = Instance.new("UICorner") antiHitSpeedCorner.CornerRadius = UDim.new(0, 5) antiHitSpeedCorner.Parent = antiHitSpeedBox antiHitSpeedBox.FocusLost:Connect(function() local value = tonumber(antiHitSpeedBox.Text) if value then hitboxState.antiHitSpeed = math.clamp(value, 1, 1000) hitboxSaveConfig() end antiHitSpeedBox.Text = tostring(hitboxState.antiHitSpeed) end) local sizeRow = Instance.new("Frame") sizeRow.Size = UDim2.new(1, 0, 0, 30) sizeRow.BackgroundTransparency = 1 sizeRow.Parent = panelContent local sizeLabel = Instance.new("TextLabel") sizeLabel.Size = UDim2.new(0.55, 0, 1, 0) sizeLabel.BackgroundTransparency = 1 sizeLabel.Text = "HITBOX SIZE (1–120)" sizeLabel.TextColor3 = Color3.fromRGB(225, 230, 240) sizeLabel.TextSize = 10 sizeLabel.Font = Enum.Font.GothamBold sizeLabel.TextXAlignment = Enum.TextXAlignment.Left sizeLabel.Parent = sizeRow hitboxSizeBox = Instance.new("TextBox") hitboxSizeBox.Size = UDim2.new(0.42, 0, 1, 0) hitboxSizeBox.Position = UDim2.new(0.58, 0, 0, 0) hitboxSizeBox.BackgroundColor3 = Color3.fromRGB(35, 42, 56) hitboxSizeBox.BorderSizePixel = 0 hitboxSizeBox.Text = tostring(hitboxState.size) hitboxSizeBox.PlaceholderText = "1–120" hitboxSizeBox.TextColor3 = hitboxThemeColor hitboxSizeBox.TextSize = 12 hitboxSizeBox.Font = Enum.Font.GothamBold hitboxSizeBox.ClearTextOnFocus = false hitboxSizeBox.Parent = sizeRow local sizeBoxCorner = Instance.new("UICorner") sizeBoxCorner.CornerRadius = UDim.new(0, 5) sizeBoxCorner.Parent = hitboxSizeBox hitboxSizeBox.FocusLost:Connect(function() local value = tonumber(hitboxSizeBox.Text) if value then hitboxState.size = math.clamp(value, 1, 120) hitboxApplyAll() hitboxSaveConfig() end hitboxSizeBox.Text = tostring(hitboxState.size) end) hitboxAddToggle("esp", "ESP HIGHLIGHT") hitboxAddToggle("hideHead", "HIDE HEAD") hitboxAddToggle("chams", "NEON CHAMS") hitboxAddToggle("tracers", "TRACERS") hitboxAddToggle("fullbright", "FULLBRIGHT") hitboxAddToggle("targetEveryone", "IGNORE TEAMS / TARGET EVERYONE") hitboxAddToggle("enemiesOnly", "PLAYER LIST: ENEMIES ONLY") hitboxSearchBox = Instance.new("TextBox") hitboxSearchBox.Size = UDim2.new(1, 0, 0, 27) hitboxSearchBox.BackgroundColor3 = Color3.fromRGB(31, 37, 50) hitboxSearchBox.BorderSizePixel = 0 hitboxSearchBox.PlaceholderText = "Search player by name..." hitboxSearchBox.Text = "" hitboxSearchBox.TextColor3 = Color3.fromRGB(235, 240, 250) hitboxSearchBox.PlaceholderColor3 = Color3.fromRGB(145, 155, 175) hitboxSearchBox.TextSize = 10 hitboxSearchBox.Font = Enum.Font.Gotham hitboxSearchBox.ClearTextOnFocus = false hitboxSearchBox.Parent = panelContent local hitboxSearchCorner = Instance.new("UICorner") hitboxSearchCorner.CornerRadius = UDim.new(0, 5) hitboxSearchCorner.Parent = hitboxSearchBox local playerListTitle = Instance.new("TextLabel") playerListTitle.Size = UDim2.new(1, 0, 0, 20) playerListTitle.BackgroundTransparency = 1 playerListTitle.Text = "PER-PLAYER HITBOX OVERRIDES" playerListTitle.TextColor3 = hitboxThemeColor playerListTitle.TextSize = 10 playerListTitle.Font = Enum.Font.GothamBold playerListTitle.TextXAlignment = Enum.TextXAlignment.Left playerListTitle.Parent = panelContent hitboxPlayerList = Instance.new("Frame") hitboxPlayerList.Size = UDim2.new(1, 0, 0, 105) hitboxPlayerList.BackgroundColor3 = Color3.fromRGB(23, 28, 39) hitboxPlayerList.BorderSizePixel = 0 hitboxPlayerList.Parent = panelContent local playerListCorner = Instance.new("UICorner") playerListCorner.CornerRadius = UDim.new(0, 6) playerListCorner.Parent = hitboxPlayerList local playerListScroll = Instance.new("ScrollingFrame") playerListScroll.Size = UDim2.new(1, -8, 1, -8) playerListScroll.Position = UDim2.fromOffset(4, 4) playerListScroll.BackgroundTransparency = 1 playerListScroll.BorderSizePixel = 0 playerListScroll.ScrollBarThickness = 3 playerListScroll.CanvasSize = UDim2.new(0, 0, 0, 0) playerListScroll.Parent = hitboxPlayerList local playerListLayout = Instance.new("UIListLayout") playerListLayout.Padding = UDim.new(0, 3) playerListLayout.SortOrder = Enum.SortOrder.LayoutOrder playerListLayout.Parent = playerListScroll playerListLayout:GetPropertyChangedSignal("AbsoluteContentSize"):Connect(function() playerListScroll.CanvasSize = UDim2.new(0, 0, 0, playerListLayout.AbsoluteContentSize.Y + 4) end) hitboxRefreshPlayerList = function() if not playerListScroll or not playerListScroll.Parent then return end for _, child in ipairs(playerListScroll:GetChildren()) do if child:IsA("GuiObject") and not child:IsA("UIListLayout") then child:Destroy() end end local orderedPlayers = {} for _, targetPlayer in ipairs(Players:GetPlayers()) do if targetPlayer ~= player then if not hitboxState.enemiesOnly or hitboxIsEnemy(targetPlayer) then table.insert(orderedPlayers, targetPlayer) end end end table.sort(orderedPlayers, function(a, b) return a.Name:lower() < b.Name:lower() end) local searchText = string.lower(hitboxSearchBox and hitboxSearchBox.Text or "") for index, targetPlayer in ipairs(orderedPlayers) do local matchesSearch = searchText == "" or string.find(string.lower(targetPlayer.Name), searchText, 1, true) or string.find(string.lower(targetPlayer.DisplayName), searchText, 1, true) if matchesSearch then local row = Instance.new("Frame") row.Size = UDim2.new(1, -2, 0, 25) row.BackgroundTransparency = 1 row.LayoutOrder = index row.Parent = playerListScroll local name = Instance.new("TextLabel") name.Size = UDim2.new(1, -62, 1, 0) name.BackgroundTransparency = 1 name.Text = targetPlayer.DisplayName .. " @" .. targetPlayer.Name name.TextColor3 = Color3.fromRGB(220, 225, 235) name.TextSize = 9 name.Font = Enum.Font.Gotham name.TextXAlignment = Enum.TextXAlignment.Left name.TextTruncate = Enum.TextTruncate.AtEnd name.Parent = row local override = Instance.new("TextButton") override.Size = UDim2.fromOffset(55, 22) override.Position = UDim2.new(1, -55, 0, 1) override.BorderSizePixel = 0 override.TextSize = 9 override.Font = Enum.Font.GothamBold override.TextColor3 = Color3.new(1, 1, 1) override.Parent = row local active = hitboxOverrides[targetPlayer] ~= false override.Text = active and "HITBOX ON" or "HITBOX OFF" override.BackgroundColor3 = active and Color3.fromRGB(20, 125, 85) or Color3.fromRGB(65, 65, 75) local overrideCorner = Instance.new("UICorner") overrideCorner.CornerRadius = UDim.new(0, 4) overrideCorner.Parent = override override.MouseButton1Click:Connect(function() hitboxOverrides[targetPlayer] = not (hitboxOverrides[targetPlayer] ~= false) local nowActive = hitboxOverrides[targetPlayer] ~= false override.Text = nowActive and "HITBOX ON" or "HITBOX OFF" override.BackgroundColor3 = nowActive and Color3.fromRGB(20, 125, 85) or Color3.fromRGB(65, 65, 75) if targetPlayer.Character then hitboxProcessCharacter(targetPlayer, targetPlayer.Character) end end) end end end hitboxSearchConnection = hitboxSearchBox:GetPropertyChangedSignal("Text"):Connect(function() hitboxRefreshPlayerList() end) hitboxMakeButton(panelContent, "REFRESH PLAYER LIST", function() hitboxRefreshPlayerList() end, 25) local function hitboxSetupPlayer(targetPlayer) if targetPlayer == player or hitboxPlayerConnections[targetPlayer] then return end local connections = {} hitboxPlayerConnections[targetPlayer] = connections table.insert(connections, targetPlayer.CharacterAdded:Connect(function(character) task.wait(0.25) if scriptEnabled and targetPlayer.Parent == Players then hitboxProcessCharacter(targetPlayer, character) end end)) if targetPlayer.Character then task.defer(hitboxProcessCharacter, targetPlayer, targetPlayer.Character) end end for _, targetPlayer in ipairs(Players:GetPlayers()) do hitboxSetupPlayer(targetPlayer) end local hitboxPlayerAddedConnection = Players.PlayerAdded:Connect(function(targetPlayer) hitboxSetupPlayer(targetPlayer) if hitboxRefreshPlayerList then hitboxRefreshPlayerList() end end) local hitboxPlayerRemovingConnection = Players.PlayerRemoving:Connect(function(targetPlayer) if hitboxPlayerConnections[targetPlayer] then for _, connection in ipairs(hitboxPlayerConnections[targetPlayer]) do if connection and connection.Connected then connection:Disconnect() end end hitboxPlayerConnections[targetPlayer] = nil end hitboxOverrides[targetPlayer] = nil local line = hitboxTracerObjects[targetPlayer] if line then pcall(function() line:Remove() end) hitboxTracerObjects[targetPlayer] = nil end if hitboxRefreshPlayerList then hitboxRefreshPlayerList() end end) local hitboxTracerAccumulator = 0 local hitboxRenderConnection = RunService.RenderStepped:Connect(function(dt) if not scriptEnabled or not hitboxState.tracers then return end hitboxTracerAccumulator = hitboxTracerAccumulator + dt if hitboxTracerAccumulator < (1 / 30) then return end hitboxTracerAccumulator = 0 local camera = workspace.CurrentCamera if not camera then return end for _, targetPlayer in ipairs(Players:GetPlayers()) do if targetPlayer ~= player and targetPlayer.Character then local root = targetPlayer.Character:FindFirstChild("HumanoidRootPart") local line = hitboxTracerObjects[targetPlayer] if root then local screenPosition, onScreen = camera:WorldToViewportPoint(root.Position) if onScreen and type(Drawing) == "table" and type(Drawing.new) == "function" then if not line then local ok, created = pcall(Drawing.new, "Line") if ok then line = created line.Thickness = 1.5 line.Transparency = 0.7 hitboxTracerObjects[targetPlayer] = line end end if line then line.From = Vector2.new(camera.ViewportSize.X / 2, camera.ViewportSize.Y) line.To = Vector2.new(screenPosition.X, screenPosition.Y) line.Color = hitboxThemeColor line.Visible = true end elseif line then pcall(function() line.Visible = false end) end elseif line then pcall(function() line.Visible = false end) end end end end) hitboxRefreshControls() hitboxApplyAll() if hitboxState.fullbright then Lighting.Ambient = Color3.new(1, 1, 1) Lighting.OutdoorAmbient = Color3.new(1, 1, 1) end task.spawn(function() while scriptEnabled and gui.Parent do if hitboxState.enabled or hitboxState.esp or hitboxState.hideHead or hitboxState.chams then hitboxApplyAll() task.wait(0.75) else task.wait(1.0) end end end) -- Anti Hit rotation controller. -- The spin is layered over the camera's current horizontal heading, instead -- of continuously forcing one fixed world heading. This lets camera yaw input -- remain responsive while the spin continues. The character stays upright; -- camera pitch (looking up/down) remains controlled by the normal camera. local antiHitAngle = 0 local antiHitRenderConnection local antiHitLastHumanoid local antiHitOriginalAutoRotate antiHitRestoreRotation = function() if antiHitLastHumanoid and antiHitLastHumanoid.Parent then antiHitLastHumanoid.AutoRotate = antiHitOriginalAutoRotate == nil and true or antiHitOriginalAutoRotate end antiHitLastHumanoid = nil antiHitOriginalAutoRotate = nil end antiHitRenderConnection = RunService.RenderStepped:Connect(function(dt) if not scriptEnabled or not hitboxState.antiHitEnabled then return end local character = player.Character local root = character and character:FindFirstChild("HumanoidRootPart") local humanoid = character and character:FindFirstChildOfClass("Humanoid") local camera = workspace.CurrentCamera if not root or not humanoid or not camera then return end if antiHitLastHumanoid ~= humanoid then antiHitLastHumanoid = humanoid antiHitOriginalAutoRotate = humanoid.AutoRotate end humanoid.AutoRotate = false antiHitAngle = (antiHitAngle + dt * (hitboxState.antiHitSpeed * 0.8)) % (math.pi * 2) local look = camera.CFrame.LookVector local cameraYaw = math.atan2(-look.X, -look.Z) root.CFrame = CFrame.new(root.Position) * CFrame.Angles(0, cameraYaw + antiHitAngle, 0) end) local function hitboxCleanup() if antiHitRenderConnection then antiHitRenderConnection:Disconnect() antiHitRenderConnection = nil end if antiHitRestoreRotation then antiHitRestoreRotation() end if hitboxPlayerAddedConnection then hitboxPlayerAddedConnection:Disconnect() end if hitboxPlayerRemovingConnection then hitboxPlayerRemovingConnection:Disconnect() end if hitboxRenderConnection then hitboxRenderConnection:Disconnect() end if hitboxSearchConnection then hitboxSearchConnection:Disconnect() end for targetPlayer, connections in pairs(hitboxPlayerConnections) do for _, connection in ipairs(connections) do if connection and connection.Connected then connection:Disconnect() end end hitboxPlayerConnections[targetPlayer] = nil end for _, targetPlayer in ipairs(Players:GetPlayers()) do if targetPlayer ~= player and targetPlayer.Character then hitboxRestoreCharacter(targetPlayer, targetPlayer.Character) end end for _, line in pairs(hitboxTracerObjects) do if line then pcall(function() line:Remove() end) end end table.clear(hitboxTracerObjects) table.clear(hitboxOverrides) Lighting.Ambient = hitboxOriginalLighting.Ambient Lighting.OutdoorAmbient = hitboxOriginalLighting.OutdoorAmbient end --==================================================-- -- END HITBOX EXPANDER INTEGRATION --==================================================-- --==================================================-- -- H = HIDE / SHOW UI --==================================================-- local hideUIConnection hideUIConnection = UserInputService.InputBegan:Connect( function(input, processed) if not scriptEnabled then return end if processed then return end if input.KeyCode ~= Enum.KeyCode.H then return end uiVisible = not uiVisible gui.Enabled = uiVisible print( "[TeleportLock] UI:", uiVisible and "VISIBLE" or "HIDDEN" ) end ) --==================================================-- -- END = FULL SHUTDOWN --==================================================-- local endConnection local function shutdownScript() if not scriptEnabled then return end scriptEnabled = false macroRunning = false autoMacroRunning = false autoMacroPending = false autoMacroWorkerTarget = nil busy = false print( "[TeleportLock] DISABLING..." ) stopMouseTracking() savedMousePosition = nil disconnectTargetLabel() if playerGuiConnection then playerGuiConnection:Disconnect() playerGuiConnection = nil end if hideUIConnection then hideUIConnection:Disconnect() hideUIConnection = nil end if endConnection then endConnection:Disconnect() endConnection = nil end if autoMacroConnection then autoMacroConnection:Disconnect() autoMacroConnection = nil end previousAutoMacroDistance = nil autoMacroArmed = false autoMacroPending = false autoMacroTarget = nil lockedTarget = nil resetTargetPrediction() if hitboxCleanup then pcall(hitboxCleanup) end if gui then gui:Destroy() end if rangePopupGui then rangePopupGui:Destroy() end print( "[TeleportLock] SCRIPT DISABLED" ) end endConnection = UserInputService.InputBegan:Connect( function(input, processed) if processed then return end if input.KeyCode == Enum.KeyCode.End then shutdownScript() end end ) --==================================================-- -- LOADED --==================================================-- print( "[TeleportLock] Loaded" ) print( "[TeleportLock] Waiting for game's lock target..." ) print( "[TeleportLock] Shift + F = Mouse Lock + Macro" ) print( "[TeleportLock] H = Hide/Show UI" ) print( "[TeleportLock] End = Kill Script" ) print( "[Macro] Highspeed Rush checkpoint enabled" ) print( "[Macro] Rush failure = sequence HARD STOP" ) print( "[Mouse] Continuous HEAD tracking enabled" ) print( "[Mouse] Head prediction lead (0 = exact head):", PREDICTION_TIME, "seconds" )