--!strict -- Place inside StarterPlayerScripts as a LocalScript. -- Includes draggable UI, HumMove/CFrameStep movement, R15/R6 walk + jump animations, -- per-part obstacle inspection, ALL/PLRS/BOTS filter, multi-strategy stair/ledge climbing, -- 1.5-second pass-cooldown tactical positioning, and Aggressive Mode with trickshots. local Players = game:GetService("Players") local RunService = game:GetService("RunService") local UserInputService = game:GetService("UserInputService") local CollectionService = game:GetService("CollectionService") local PathfindingService = game:GetService("PathfindingService") local localPlayer = Players.LocalPlayer local playerGui = localPlayer:WaitForChild("PlayerGui") export type EntityFilterMode = "ALL" | "PLRS" | "BOTS" export type TrackedEntity = { name: string, isBot: boolean, player: Player?, character: Model, humanoid: Humanoid, root: BasePart, } -- ============================================================================ -- CONFIGURATION & GAME ADAPTERS -- ============================================================================ local Config = { Enabled = true, AggressiveMode = false, ToggleKey = Enum.KeyCode.F8, DebugLogs = false, FilterMode = "ALL" :: EntityFilterMode, ThreatRadius = 22, AnklebreakRadius = 11, PassRange = 8.5, -- 1.5s Pass Cooldown Advantage Tuning PassLockoutDuration = 1.5, CommitLeadTime = 0.22, RunAwayAfterBombTransferred = true, StrafeFlipInterval = 0.35, JumpEnabled = true, JumpCooldown = 0.75, AutoWalkToPassTarget = true, UseCFrameFallback = false, -- Elevated target & stair climbing tuning ElevationThreshold = 3.2, PathRecomputeInterval = 0.28, WaypointReachDist = 3.5, StairSearchRadius = 95, -- Obstacle detection tuning ProbeDistance = 5.5, MaxJumpableHeight = 5.5, -- Fallback Roblox default animation IDs R15WalkAnimId = "rbxassetid://913402848", R15JumpAnimId = "rbxassetid://507765000", R6WalkAnimId = "rbxassetid://180426354", R6JumpAnimId = "rbxassetid://125750702", } local function hasBombOnEntity(character: Model, player: Player?): boolean if character:GetAttribute("HasBomb") == true or character:GetAttribute("IsBomb") == true then return true end if player and (player:GetAttribute("HasBomb") == true or player:GetAttribute("IsBomb") == true) then return true end for _, desc in ipairs(character:GetDescendants()) do if desc:IsA("BoolValue") and (desc.Name:lower():find("bomb") or desc.Name:lower():find("bomba")) and desc.Value == true then return true end end if player then for _, desc in ipairs(player:GetDescendants()) do if desc:IsA("BoolValue") and (desc.Name:lower():find("bomb") or desc.Name:lower():find("bomba")) and desc.Value == true then return true end end local backpack = player:FindFirstChild("Backpack") if backpack then for _, child in ipairs(backpack:GetChildren()) do if child:IsA("Tool") then local lower = child.Name:lower() if lower:find("bomb") or lower:find("bomba") or lower:find("potato") then return true end end end end end for _, child in ipairs(character:GetChildren()) do if child:IsA("Tool") then local lower = child.Name:lower() if lower:find("bomb") or lower:find("bomba") or lower:find("potato") then return true end end end return false end local lastPassAttempt = 0 local lastPassTargetPos: Vector3? = nil local hadBombLastFrame = false local bombReceivedTime = 0 local bombLostTime = 0 local bombLostFromPos: Vector3? = nil local function triggerPass(targetEntity: TrackedEntity) local now = os.clock() local minInterval = Config.AggressiveMode and 0.02 or 0.08 if now - lastPassAttempt < minInterval then return end lastPassAttempt = now lastPassTargetPos = targetEntity.root.Position if Config.DebugLogs then print(string.format("[TAS BOT] Attempting pass to %s (%s)", targetEntity.name, targetEntity.isBot and "BOT" or "PLAYER")) end end -- ============================================================================ -- ENTITY COLLECTION (PLAYERS & BOTS) -- ============================================================================ local function isValidLivingCharacter(model: Instance): (Humanoid?, BasePart?) if not model:IsA("Model") then return nil, nil end if localPlayer.Character and model == localPlayer.Character then return nil, nil end local humanoid = model:FindFirstChildOfClass("Humanoid") if not humanoid or humanoid.Health <= 0 then return nil, nil end local root = model:FindFirstChild("HumanoidRootPart") if not root or not root:IsA("BasePart") then return nil, nil end return humanoid, root end local function matchesFilter(isBot: boolean): boolean if Config.FilterMode == "ALL" then return true elseif Config.FilterMode == "PLRS" then return not isBot else return isBot end end local function collectEntities(): { TrackedEntity } local results: { TrackedEntity } = {} local playerCharacters: { [Model]: boolean } = {} for _, player in ipairs(Players:GetPlayers()) do if player ~= localPlayer and player.Character then playerCharacters[player.Character] = true if matchesFilter(false) then local hum, root = isValidLivingCharacter(player.Character) if hum and root then table.insert(results, { name = player.Name, isBot = false, player = player, character = player.Character, humanoid = hum, root = root, }) end end end end if matchesFilter(true) then for _, desc in ipairs(workspace:GetDescendants()) do if desc:IsA("Humanoid") then local model = desc.Parent if model and model:IsA("Model") and not playerCharacters[model] and model ~= localPlayer.Character then local alreadyAdded = false for _, existing in ipairs(results) do if existing.character == model then alreadyAdded = true break end end if not alreadyAdded then local hum, root = isValidLivingCharacter(model) if hum and root then table.insert(results, { name = model.Name, isBot = true, player = nil, character = model, humanoid = hum, root = root, }) end end end end end end return results end -- ============================================================================ -- ANIMATION CONTROLLER (R15 & R6 Walk + Jump) -- ============================================================================ type AnimBundle = { character: Model, walkTrack: AnimationTrack?, jumpTrack: AnimationTrack?, } local currentAnimBundle: AnimBundle? = nil local function resolveAnimId(character: Model, folderName: string, fallbackId: string): string local animateScript = character:FindFirstChild("Animate") if animateScript then local folder = animateScript:FindFirstChild(folderName) if folder then local animObj = folder:FindFirstChildOfClass("Animation") if animObj and animObj.AnimationId ~= "" then return animObj.AnimationId end end end return fallbackId end local function getAnimBundle(character: Model, humanoid: Humanoid): AnimBundle if currentAnimBundle and currentAnimBundle.character == character then return currentAnimBundle end local animator = humanoid:FindFirstChildOfClass("Animator") if not animator then animator = Instance.new("Animator") animator.Parent = humanoid end local isR15 = humanoid.RigType == Enum.HumanoidRigType.R15 local walkId = resolveAnimId( character, isR15 and "run" or "walk", isR15 and Config.R15WalkAnimId or Config.R6WalkAnimId ) local jumpId = resolveAnimId( character, "jump", isR15 and Config.R15JumpAnimId or Config.R6JumpAnimId ) local walkAnim = Instance.new("Animation") walkAnim.AnimationId = walkId local walkTrack = animator:LoadAnimation(walkAnim) walkTrack.Priority = Enum.AnimationPriority.Movement walkTrack.Looped = true local jumpAnim = Instance.new("Animation") jumpAnim.AnimationId = jumpId local jumpTrack = animator:LoadAnimation(jumpAnim) jumpTrack.Priority = Enum.AnimationPriority.Action jumpTrack.Looped = false currentAnimBundle = { character = character, walkTrack = walkTrack, jumpTrack = jumpTrack, } return currentAnimBundle end local function updateAnimations(character: Model, humanoid: Humanoid, isMoving: boolean, isAirborne: boolean) local bundle = getAnimBundle(character, humanoid) local walkTrack = bundle.walkTrack local jumpTrack = bundle.jumpTrack if isAirborne then if walkTrack and walkTrack.IsPlaying then walkTrack:Stop(0.1) end if jumpTrack and not jumpTrack.IsPlaying then jumpTrack:Play(0.08) end else if jumpTrack and jumpTrack.IsPlaying then jumpTrack:Stop(0.12) end if isMoving then if walkTrack then local speedRatio = math.clamp((humanoid.WalkSpeed > 0 and humanoid.WalkSpeed or 16) / 16, 0.5, 2.5) walkTrack:AdjustSpeed(speedRatio) if not walkTrack.IsPlaying then walkTrack:Play(0.12) end end else if walkTrack and walkTrack.IsPlaying then walkTrack:Stop(0.15) end end end end local function stopAllAnimations() if not currentAnimBundle then return end if currentAnimBundle.walkTrack and currentAnimBundle.walkTrack.IsPlaying then currentAnimBundle.walkTrack:Stop(0.12) end if currentAnimBundle.jumpTrack and currentAnimBundle.jumpTrack.IsPlaying then currentAnimBundle.jumpTrack:Stop(0.12) end end -- ============================================================================ -- JUMP & GROUND CHECKS -- ============================================================================ local lastJumpTime = 0 local function isGrounded(humanoid: Humanoid, root: BasePart, character: Model): boolean if humanoid.FloorMaterial ~= Enum.Material.Air then return true end local rayParams = RaycastParams.new() rayParams.FilterType = Enum.RaycastFilterType.Exclude rayParams.FilterDescendantsInstances = { character } local hipOffset = humanoid.HipHeight + (root.Size.Y * 0.5) + 0.35 return workspace:Raycast(root.Position, Vector3.new(0, -hipOffset, 0), rayParams) ~= nil end local function triggerJump(character: Model, humanoid: Humanoid, root: BasePart) if not Config.JumpEnabled then return end local now = os.clock() local cooldown = Config.AggressiveMode and (Config.JumpCooldown * 0.6) or Config.JumpCooldown if (now - lastJumpTime) < cooldown then return end if not isGrounded(humanoid, root, character) then return end lastJumpTime = now humanoid.Jump = true humanoid:ChangeState(Enum.HumanoidStateType.Jumping) local jumpPower = humanoid.UseJumpPower and humanoid.JumpPower or math.sqrt(2 * workspace.Gravity * humanoid.JumpHeight) local vel = root.AssemblyLinearVelocity if vel.Y < jumpPower * 0.5 then root.AssemblyLinearVelocity = Vector3.new(vel.X, jumpPower, vel.Z) end local bundle = getAnimBundle(character, humanoid) if bundle.jumpTrack then bundle.jumpTrack:Play(0.05) end end -- ============================================================================ -- STAIR / ELEVATED ROUTE FINDER (PathfindingService + Stair/Step/Slope Scanner) -- ============================================================================ local activePath: Path? = nil local cachedWaypoints: { PathWaypoint } = {} local currentWaypointIdx = 2 local lastPathComputeTime = 0 local lastPathTargetId: Model? = nil local lastClimbCheckTime = 0 local lastClimbCheckY = 0 local pathStallCount = 0 local function resetElevationPath() cachedWaypoints = {} currentWaypointIdx = 2 lastPathTargetId = nil pathStallCount = 0 lastClimbCheckTime = 0 end local function partLooksLikeStairOrRamp(part: BasePart): boolean if not part.CanCollide then return false end if part:IsA("WedgePart") or part:IsA("TrussPart") then return true end local nameLower = part.Name:lower() for _, kw in ipairs({ "stair", "step", "ramp", "ladder", "slope", "incline", "bridge", "catwalk" }) do if nameLower:find(kw, 1, true) or part:GetAttribute(kw) == true or CollectionService:HasTag(part, kw) then return true end end local parentModel = part:FindFirstAncestorOfClass("Model") if parentModel then local modelLower = parentModel.Name:lower() for _, kw in ipairs({ "stair", "step", "ramp", "ladder", "slope", "incline", "bridge", "catwalk" }) do if modelLower:find(kw, 1, true) or parentModel:GetAttribute(kw) == true or CollectionService:HasTag(parentModel, kw) then return true end end end -- Detect step-like or angled parts whose top rises between current height and target height local upY = part.CFrame.UpVector.Y if upY > 0.25 and upY < 0.96 then return true end return false end local function getPartTopY(part: BasePart): number local sx, sy, sz = part.Size.X, part.Size.Y, part.Size.Z local cf = part.CFrame local topExtent = math.abs(cf.UpVector.Y) * (sy * 0.5) + math.abs(cf.RightVector.Y) * (sx * 0.5) + math.abs(cf.LookVector.Y) * (sz * 0.5) return cf.Position.Y + topExtent end -- Computes the horizontal ascent vector of a wedge/ramp or finds the best stair/step to climb local function findStairClimbDirection(myPos: Vector3, targetPos: Vector3): (Vector3?, boolean, string?) local overlapParams = OverlapParams.new() overlapParams.MaxParts = 400 local nearbyParts = workspace:GetPartBoundsInRadius(myPos, Config.StairSearchRadius, overlapParams) local bestPart: BasePart? = nil local bestScore = math.huge for _, part in ipairs(nearbyParts) do if partLooksLikeStairOrRamp(part) then local topY = getPartTopY(part) -- Must reach higher than where we currently are, up to slightly above target if topY > (myPos.Y - 1.5) and part.Position.Y <= (targetPos.Y + 8) then local flatPart = Vector3.new(part.Position.X, 0, part.Position.Z) local flatMe = Vector3.new(myPos.X, 0, myPos.Z) local flatTarget = Vector3.new(targetPos.X, 0, targetPos.Z) local distFromMe = (flatPart - flatMe).Magnitude local distToTarget = (flatPart - flatTarget).Magnitude -- Strongly favor parts closer to us that also sit reasonably on the way to the target local score = distFromMe * 1.15 + distToTarget * 0.55 if score < bestScore then bestScore = score bestPart = part end end end end if not bestPart then return nil, false, nil end local flatMe = Vector3.new(myPos.X, 0, myPos.Z) local flatPart = Vector3.new(bestPart.Position.X, 0, bestPart.Position.Z) local toPart = flatPart - flatMe local horizDist = toPart.Magnitude -- If we are on or right next to the stair/wedge, push along its upward slope (or toward target) if horizDist <= (math.max(bestPart.Size.X, bestPart.Size.Z) * 0.5 + 3.5) then local slopeVec = bestPart.CFrame.UpVector local flatSlope = Vector3.new(slopeVec.X, 0, slopeVec.Z) local towardTarget = Vector3.new(targetPos.X - myPos.X, 0, targetPos.Z - myPos.Z) local climbDir: Vector3 if flatSlope.Magnitude > 0.15 then -- Blend upward slope direction with target direction so we stay on the stairs local slopeUnit = flatSlope.Unit if towardTarget.Magnitude > 1e-3 then climbDir = (slopeUnit * 0.7 + towardTarget.Unit * 0.3).Unit else climbDir = slopeUnit end elseif towardTarget.Magnitude > 1e-3 then climbDir = towardTarget.Unit else climbDir = Vector3.new(bestPart.CFrame.LookVector.X, 0, bestPart.CFrame.LookVector.Z).Unit end local needJump = bestPart:IsA("TrussPart") or (getPartTopY(bestPart) - myPos.Y > 2.2) return climbDir, needJump, "CLIMBING (" .. bestPart.Name .. ")" end local moveToStair = toPart.Unit return moveToStair, false, "TO STAIRS (" .. bestPart.Name .. ")" end local function computeElevatedApproach( character: Model, humanoid: Humanoid, myRoot: BasePart, targetEntity: TrackedEntity ): (Vector3, boolean, string) local myPos = myRoot.Position local targetPos = targetEntity.root.Position local now = os.clock() -- Track whether we are actually gaining elevation while trying to reach the upper player if lastClimbCheckTime == 0 then lastClimbCheckTime = now lastClimbCheckY = myPos.Y elseif (now - lastClimbCheckTime) >= 0.45 then local gainedY = myPos.Y - lastClimbCheckY if gainedY < 1.2 then pathStallCount += 1 else pathStallCount = 0 end lastClimbCheckTime = now lastClimbCheckY = myPos.Y end -- If pathfinding stalled or failed, immediately use stair/ramp/ledge climbing local forceStairScanner = pathStallCount >= 2 if not forceStairScanner then if not activePath then activePath = PathfindingService:CreatePath({ AgentRadius = 2.0, AgentHeight = 5.0, AgentCanJump = true, AgentCanClimb = true, WaypointSpacing = 3.0, }) end local recomputeInterval = Config.AggressiveMode and 0.2 or Config.PathRecomputeInterval if (now - lastPathComputeTime) >= recomputeInterval or lastPathTargetId ~= targetEntity.character or #cachedWaypoints == 0 then lastPathComputeTime = now lastPathTargetId = targetEntity.character local ok = pcall(function() if activePath then activePath:ComputeAsync(myPos, targetPos) end end) if ok and activePath and activePath.Status == Enum.PathStatus.Success then cachedWaypoints = activePath:GetWaypoints() currentWaypointIdx = 2 else cachedWaypoints = {} pathStallCount += 1 end end if #cachedWaypoints >= 2 then while currentWaypointIdx <= #cachedWaypoints do local wp = cachedWaypoints[currentWaypointIdx] local flatDist = (Vector3.new(wp.Position.X, 0, wp.Position.Z) - Vector3.new(myPos.X, 0, myPos.Z)).Magnitude local heightDiff = math.abs(wp.Position.Y - myPos.Y) if flatDist <= Config.WaypointReachDist and heightDiff <= 5.0 then currentWaypointIdx += 1 else break end end local wp = cachedWaypoints[math.min(currentWaypointIdx, #cachedWaypoints)] local toWp = Vector3.new(wp.Position.X - myPos.X, 0, wp.Position.Z - myPos.Z) if toWp.Magnitude > 1e-3 then local shouldJump = wp.Action == Enum.PathWaypointAction.Jump or (wp.Position.Y - myPos.Y) > 2.0 return toWp.Unit, shouldJump, string.format("PATH CLIMB (%d/%d)", math.min(currentWaypointIdx, #cachedWaypoints), #cachedWaypoints) end end end local stairDir, stairJump, stairLabel = findStairClimbDirection(myPos, targetPos) if stairDir then return stairDir, stairJump, stairLabel or "CLIMB STAIRS" end -- Last-resort direct approach + jump to hop onto elevated steps/ledges local direct = Vector3.new(targetPos.X - myPos.X, 0, targetPos.Z - myPos.Z) return (direct.Magnitude > 1e-3 and direct.Unit or Vector3.zero), true, "CLIMB JUMP" end -- ============================================================================ -- PER-PART OBSTACLE INSPECTOR & ACTION DISPATCHER -- ============================================================================ type ObstacleActionResult = { overrideDir: Vector3?, shouldJump: boolean, label: string?, } local function partMatchesKeywords(part: BasePart, keywords: { string }): boolean local nameLower = part.Name:lower() for _, kw in ipairs(keywords) do if nameLower:find(kw, 1, true) then return true end if part:GetAttribute(kw) == true or CollectionService:HasTag(part, kw) then return true end end local parentModel = part:FindFirstAncestorOfClass("Model") if parentModel then local modelLower = parentModel.Name:lower() for _, kw in ipairs(keywords) do if modelLower:find(kw, 1, true) or parentModel:GetAttribute(kw) == true or CollectionService:HasTag(parentModel, kw) then return true end end end return false end local function handleSpecialPartAction(part: BasePart, flatDir: Vector3, strafeSign: number): Vector3? if partMatchesKeywords(part, { "boost", "speed", "pad", "conveyor" }) then return flatDir elseif partMatchesKeywords(part, { "door", "gate", "barrier", "button", "lever" }) then local tangent = Vector3.new(-flatDir.Z, 0, flatDir.X) * strafeSign return (flatDir * 0.35 + tangent * 0.65).Unit end return nil end local function inspectBlockingPart( character: Model, humanoid: Humanoid, root: BasePart, flatDir: Vector3, strafeSign: number, isClimbingStairs: boolean ): ObstacleActionResult if flatDir.Magnitude < 1e-4 then return { overrideDir = nil, shouldJump = false, label = nil } end local rayParams = RaycastParams.new() rayParams.FilterType = Enum.RaycastFilterType.Exclude rayParams.FilterDescendantsInstances = { character } local origins = { root.Position, root.Position - Vector3.new(0, 1.5, 0), } for _, origin in ipairs(origins) do local result = workspace:Raycast(origin, flatDir * Config.ProbeDistance, rayParams) if result and result.Instance and result.Instance:IsA("BasePart") then local hitPart: BasePart = result.Instance local hitModel = hitPart:FindFirstAncestorOfClass("Model") if hitModel and hitModel:FindFirstChildOfClass("Humanoid") then continue end -- When climbing toward an elevated target, jump/step up onto stairs/ledges instead of wall-cutting away if isClimbingStairs then if partLooksLikeStairOrRamp(hitPart) then return { overrideDir = flatDir, shouldJump = hitPart:IsA("TrussPart"), label = "STEP UP (" .. hitPart.Name .. ")", } end local feetY = root.Position.Y - (humanoid.HipHeight + root.Size.Y * 0.5) local topY = getPartTopY(hitPart) local heightAboveFeet = topY - feetY if hitPart.CanCollide and heightAboveFeet > 0.3 and heightAboveFeet <= (Config.MaxJumpableHeight + 2.0) then return { overrideDir = flatDir, shouldJump = true, label = "LEDGE CLIMB (" .. hitPart.Name .. ")", } end end if partMatchesKeywords(hitPart, { "lava", "kill", "hazard", "acid", "spike", "danger", "bomb" }) then local awayFromHit = Vector3.new(root.Position.X - hitPart.Position.X, 0, root.Position.Z - hitPart.Position.Z) if awayFromHit.Magnitude < 1e-3 then awayFromHit = Vector3.new(-flatDir.Z, 0, flatDir.X) * strafeSign else awayFromHit = awayFromHit.Unit end local tangent = Vector3.new(-awayFromHit.Z, 0, awayFromHit.X) * strafeSign local dodgeDir = (awayFromHit * 0.65 + tangent * 0.35).Unit return { overrideDir = dodgeDir, shouldJump = true, label = "HAZARD DODGE (" .. hitPart.Name .. ")", } end local specialDir = handleSpecialPartAction(hitPart, flatDir, strafeSign) if specialDir then return { overrideDir = specialDir, shouldJump = partMatchesKeywords(hitPart, { "jump", "bounce", "pad" }), label = "PART ACTION (" .. hitPart.Name .. ")", } end if not hitPart.CanCollide then continue end local feetY = root.Position.Y - (humanoid.HipHeight + root.Size.Y * 0.5) local topY = getPartTopY(hitPart) local heightAboveFeet = topY - feetY if heightAboveFeet > 0.4 and heightAboveFeet <= Config.MaxJumpableHeight then return { overrideDir = flatDir, shouldJump = true, label = "HURDLE (" .. hitPart.Name .. ")", } elseif heightAboveFeet > Config.MaxJumpableHeight then local normalFlat = Vector3.new(result.Normal.X, 0, result.Normal.Z) if normalFlat.Magnitude < 1e-3 then normalFlat = -flatDir else normalFlat = normalFlat.Unit end local tangent = Vector3.new(-normalFlat.Z, 0, normalFlat.X) * strafeSign local routeDir = (tangent * 0.78 + normalFlat * 0.22).Unit return { overrideDir = routeDir, shouldJump = false, label = "WALL CUT (" .. hitPart.Name .. ")", } end end end return { overrideDir = nil, shouldJump = false, label = nil } end -- ============================================================================ -- MOVEMENT EXECUTOR -- ============================================================================ local smoothedDir = Vector3.zero local function applyMovement( character: Model, humanoid: Humanoid, root: BasePart, dir: Vector3, strafeSign: number, dt: number, isClimbingStairs: boolean? ): string? local flatDir = Vector3.new(dir.X, 0, dir.Z) local hasDesiredMove = flatDir.Magnitude > 1e-4 if hasDesiredMove then flatDir = flatDir.Unit else flatDir = Vector3.zero end local actionLabel: string? = nil if hasDesiredMove then local inspection = inspectBlockingPart(character, humanoid, root, flatDir, strafeSign, isClimbingStairs == true) if inspection.overrideDir and inspection.overrideDir.Magnitude > 1e-4 then flatDir = inspection.overrideDir.Unit end if inspection.shouldJump then triggerJump(character, humanoid, root) end actionLabel = inspection.label end local outputDir: Vector3 if Config.AggressiveMode then smoothedDir = flatDir outputDir = flatDir else local blendAlpha = 1 - math.exp(-18 * math.clamp(dt, 0, 0.05)) smoothedDir = smoothedDir:Lerp(flatDir, blendAlpha) outputDir = smoothedDir.Magnitude > 1e-3 and smoothedDir.Unit or Vector3.zero end local isMoving = hasDesiredMove and outputDir.Magnitude > 1e-3 if humanoid.WalkToPoint ~= Vector3.zero and isMoving then humanoid:MoveTo(root.Position + outputDir * 4) end humanoid:Move(outputDir, false) if Config.UseCFrameFallback and isMoving and not root.Anchored then local speed = humanoid.WalkSpeed > 0 and humanoid.WalkSpeed or 16 local stepDist = speed * math.clamp(dt, 0, 0.05) local rayParams = RaycastParams.new() rayParams.FilterType = Enum.RaycastFilterType.Exclude rayParams.FilterDescendantsInstances = { character } local hit = workspace:Raycast(root.Position, outputDir * (stepDist + 2.2), rayParams) if not hit or (isClimbingStairs and hit.Instance:IsA("BasePart") and partLooksLikeStairOrRamp(hit.Instance)) then local stepY = root.Position.Y if isClimbingStairs and hit and hit.Instance:IsA("BasePart") then local topY = getPartTopY(hit.Instance) local feetY = root.Position.Y - (humanoid.HipHeight + root.Size.Y * 0.5) if topY > feetY and (topY - feetY) <= 3.5 then stepY = math.max(stepY, topY + humanoid.HipHeight + root.Size.Y * 0.5 - 0.15) end end local targetPos = root.Position + outputDir * stepDist root.CFrame = CFrame.lookAt( Vector3.new(targetPos.X, stepY, targetPos.Z), Vector3.new(targetPos.X + outputDir.X, stepY, targetPos.Z + outputDir.Z) ) else local slideDir = outputDir - hit.Normal * outputDir:Dot(hit.Normal) if slideDir.Magnitude > 1e-3 then slideDir = slideDir.Unit local slideHit = workspace:Raycast(root.Position, slideDir * (stepDist + 2.2), rayParams) if not slideHit then local slidePos = root.Position + slideDir * stepDist root.CFrame = CFrame.lookAt( Vector3.new(slidePos.X, root.Position.Y, slidePos.Z), Vector3.new(slidePos.X + slideDir.X, root.Position.Y, slidePos.Z + slideDir.Z) ) end end end end local airborne = not isGrounded(humanoid, root, character) updateAnimations(character, humanoid, isMoving, airborne) return actionLabel end -- ============================================================================ -- AGGRESSIVE TRICKSHOT ENGINE (360 Spin-Cuts, Bait-Reversals & Jump-Flicks) -- ============================================================================ local trickshotSpinAngle = 0 local lastTrickshotTime = 0 local activeTrickshotLabel: string? = nil local function applyAggressiveTrickshot( character: Model, humanoid: Humanoid, root: BasePart, baseMoveDir: Vector3, enemyPos: Vector3, enemyDist: number, isHoldingBomb: boolean, dt: number ): (Vector3, string?) if not Config.AggressiveMode then activeTrickshotLabel = nil return baseMoveDir, nil end local now = os.clock() local flatMyPos = Vector3.new(root.Position.X, 0, root.Position.Z) local flatEnemyPos = Vector3.new(enemyPos.X, 0, enemyPos.Z) local toEnemy = flatEnemyPos - flatMyPos local towardEnemy = toEnemy.Magnitude > 1e-4 and toEnemy.Unit or Vector3.new(0, 0, -1) if isHoldingBomb then if enemyDist <= Config.PassRange + 4.5 then if (now - lastTrickshotTime) >= 0.9 then lastTrickshotTime = now trickshotSpinAngle = math.pi * 2 activeTrickshotLabel = "360 FLICK PASS" triggerJump(character, humanoid, root) end end if trickshotSpinAngle > 0 and not root.Anchored then local spinStep = math.min(trickshotSpinAngle, dt * 26) trickshotSpinAngle -= spinStep root.CFrame = root.CFrame * CFrame.Angles(0, spinStep, 0) if trickshotSpinAngle <= 0.05 then activeTrickshotLabel = nil end end return baseMoveDir, activeTrickshotLabel end if enemyDist <= Config.AnklebreakRadius * 1.15 then if (now - lastTrickshotTime) >= 0.65 then lastTrickshotTime = now trickshotSpinAngle = math.pi * 2 activeTrickshotLabel = "360 BAIT-CUT" triggerJump(character, humanoid, root) end if trickshotSpinAngle > 0 and not root.Anchored then local spinStep = math.min(trickshotSpinAngle, dt * 28) trickshotSpinAngle -= spinStep root.CFrame = root.CFrame * CFrame.Angles(0, -spinStep, 0) if trickshotSpinAngle <= 0.05 then activeTrickshotLabel = nil end end local perp = Vector3.new(-towardEnemy.Z, 0, towardEnemy.X) local sideSign = (math.floor(now * 6) % 2 == 0) and 1 or -1 local crossDir = (perp * sideSign * 0.88 - towardEnemy * 0.47).Unit return crossDir, activeTrickshotLabel or "LOCK-IN V-CUT" end activeTrickshotLabel = nil return baseMoveDir, nil end -- ============================================================================ -- UI BUILDER -- ============================================================================ local function cycleFilterMode(): EntityFilterMode if Config.FilterMode == "ALL" then Config.FilterMode = "PLRS" elseif Config.FilterMode == "PLRS" then Config.FilterMode = "BOTS" else Config.FilterMode = "ALL" end return Config.FilterMode end local function createBotUI() local existing = playerGui:FindFirstChild("TimebombTAS_UI") if existing then existing:Destroy() end local screenGui = Instance.new("ScreenGui") screenGui.Name = "TimebombTAS_UI" screenGui.ResetOnSpawn = false screenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling screenGui.Parent = playerGui local mainFrame = Instance.new("Frame") mainFrame.Name = "MainFrame" mainFrame.Size = UDim2.fromOffset(250, 405) mainFrame.Position = UDim2.new(0, 20, 0.5, -202) mainFrame.BackgroundColor3 = Color3.fromRGB(22, 24, 30) mainFrame.BorderSizePixel = 0 mainFrame.Parent = screenGui Instance.new("UICorner", mainFrame).CornerRadius = UDim.new(0, 8) local stroke = Instance.new("UIStroke", mainFrame) stroke.Color = Color3.fromRGB(55, 60, 75) stroke.Thickness = 1 local header = Instance.new("Frame") header.Name = "Header" header.Size = UDim2.new(1, 0, 0, 32) header.BackgroundColor3 = Color3.fromRGB(30, 33, 42) header.BorderSizePixel = 0 header.Parent = mainFrame Instance.new("UICorner", header).CornerRadius = UDim.new(0, 8) local title = Instance.new("TextLabel") title.Size = UDim2.new(1, -40, 1, 0) title.Position = UDim2.fromOffset(10, 0) title.BackgroundTransparency = 1 title.Text = "BOMBA TAS BOT" title.TextColor3 = Color3.fromRGB(235, 240, 250) title.Font = Enum.Font.GothamBold title.TextSize = 13 title.TextXAlignment = Enum.TextXAlignment.Left title.Parent = header local minimizeBtn = Instance.new("TextButton") minimizeBtn.Size = UDim2.fromOffset(24, 24) minimizeBtn.Position = UDim2.new(1, -28, 0, 4) minimizeBtn.BackgroundColor3 = Color3.fromRGB(45, 50, 65) minimizeBtn.Text = "-" minimizeBtn.TextColor3 = Color3.fromRGB(220, 225, 235) minimizeBtn.Font = Enum.Font.GothamBold minimizeBtn.TextSize = 14 minimizeBtn.Parent = header Instance.new("UICorner", minimizeBtn).CornerRadius = UDim.new(0, 5) local body = Instance.new("Frame") body.Name = "Body" body.Size = UDim2.new(1, -16, 1, -40) body.Position = UDim2.fromOffset(8, 36) body.BackgroundTransparency = 1 body.Parent = mainFrame local listLayout = Instance.new("UIListLayout") listLayout.Padding = UDim.new(0, 6) listLayout.SortOrder = Enum.SortOrder.LayoutOrder listLayout.Parent = body local toggleBtn = Instance.new("TextButton") toggleBtn.LayoutOrder = 1 toggleBtn.Size = UDim2.new(1, 0, 0, 30) toggleBtn.Font = Enum.Font.GothamBold toggleBtn.TextSize = 12 toggleBtn.TextColor3 = Color3.new(1, 1, 1) toggleBtn.Parent = body Instance.new("UICorner", toggleBtn).CornerRadius = UDim.new(0, 6) local statusLabel = Instance.new("TextLabel") statusLabel.LayoutOrder = 2 statusLabel.Size = UDim2.new(1, 0, 0, 42) statusLabel.BackgroundColor3 = Color3.fromRGB(30, 33, 42) statusLabel.TextColor3 = Color3.fromRGB(185, 195, 215) statusLabel.Font = Enum.Font.GothamMedium statusLabel.TextSize = 11 statusLabel.TextWrapped = true statusLabel.Text = "State: IDLE | Dist: --" statusLabel.Parent = body Instance.new("UICorner", statusLabel).CornerRadius = UDim.new(0, 6) local aggressiveBtn = Instance.new("TextButton") aggressiveBtn.LayoutOrder = 3 aggressiveBtn.Size = UDim2.new(1, 0, 0, 26) aggressiveBtn.Font = Enum.Font.GothamBold aggressiveBtn.TextSize = 11 aggressiveBtn.TextColor3 = Color3.new(1, 1, 1) aggressiveBtn.Parent = body Instance.new("UICorner", aggressiveBtn).CornerRadius = UDim.new(0, 5) local function refreshAggressiveVisual() if Config.AggressiveMode then aggressiveBtn.Text = "Aggressive Mode: ON (LOCK-IN)" aggressiveBtn.BackgroundColor3 = Color3.fromRGB(185, 52, 68) else aggressiveBtn.Text = "Aggressive Mode: OFF" aggressiveBtn.BackgroundColor3 = Color3.fromRGB(58, 52, 65) end end refreshAggressiveVisual() aggressiveBtn.MouseButton1Click:Connect(function() Config.AggressiveMode = not Config.AggressiveMode trickshotSpinAngle = 0 activeTrickshotLabel = nil refreshAggressiveVisual() end) local filterBtn = Instance.new("TextButton") filterBtn.LayoutOrder = 4 filterBtn.Size = UDim2.new(1, 0, 0, 26) filterBtn.Font = Enum.Font.GothamBold filterBtn.TextSize = 11 filterBtn.TextColor3 = Color3.new(1, 1, 1) filterBtn.Parent = body Instance.new("UICorner", filterBtn).CornerRadius = UDim.new(0, 5) local function refreshFilterVisual() if Config.FilterMode == "ALL" then filterBtn.Text = "Targets: ALL (Bots + Players)" filterBtn.BackgroundColor3 = Color3.fromRGB(52, 78, 128) elseif Config.FilterMode == "PLRS" then filterBtn.Text = "Targets: PLAYERS ONLY" filterBtn.BackgroundColor3 = Color3.fromRGB(68, 92, 138) else filterBtn.Text = "Targets: BOTS ONLY" filterBtn.BackgroundColor3 = Color3.fromRGB(115, 72, 130) end end refreshFilterVisual() filterBtn.MouseButton1Click:Connect(function() cycleFilterMode() refreshFilterVisual() end) local function addStepper(order: number, labelText: string, step: number, minVal: number, maxVal: number, getVal: () -> number, setVal: (number) -> ()) local row = Instance.new("Frame") row.LayoutOrder = order row.Size = UDim2.new(1, 0, 0, 26) row.BackgroundColor3 = Color3.fromRGB(28, 31, 39) row.Parent = body Instance.new("UICorner", row).CornerRadius = UDim.new(0, 5) local lbl = Instance.new("TextLabel") lbl.Size = UDim2.new(1, -64, 1, 0) lbl.Position = UDim2.fromOffset(8, 0) lbl.BackgroundTransparency = 1 lbl.TextColor3 = Color3.fromRGB(215, 220, 230) lbl.Font = Enum.Font.Gotham lbl.TextSize = 11 lbl.TextXAlignment = Enum.TextXAlignment.Left lbl.Parent = row local function refreshText() lbl.Text = string.format("%s: %.1f", labelText, getVal()) end refreshText() local minusBtn = Instance.new("TextButton") minusBtn.Size = UDim2.fromOffset(24, 20) minusBtn.Position = UDim2.new(1, -54, 0, 3) minusBtn.BackgroundColor3 = Color3.fromRGB(48, 53, 68) minusBtn.Text = "-" minusBtn.TextColor3 = Color3.new(1, 1, 1) minusBtn.Font = Enum.Font.GothamBold minusBtn.TextSize = 12 minusBtn.Parent = row Instance.new("UICorner", minusBtn).CornerRadius = UDim.new(0, 4) local plusBtn = Instance.new("TextButton") plusBtn.Size = UDim2.fromOffset(24, 20) plusBtn.Position = UDim2.new(1, -27, 0, 3) plusBtn.BackgroundColor3 = Color3.fromRGB(48, 53, 68) plusBtn.Text = "+" plusBtn.TextColor3 = Color3.new(1, 1, 1) plusBtn.Font = Enum.Font.GothamBold plusBtn.TextSize = 12 plusBtn.Parent = row Instance.new("UICorner", plusBtn).CornerRadius = UDim.new(0, 4) minusBtn.MouseButton1Click:Connect(function() setVal(math.clamp(getVal() - step, minVal, maxVal)) refreshText() end) plusBtn.MouseButton1Click:Connect(function() setVal(math.clamp(getVal() + step, minVal, maxVal)) refreshText() end) end local function addBoolToggle(order: number, labelText: string, onLabel: string, offLabel: string, getVal: () -> boolean, setVal: (boolean) -> ()) local btn = Instance.new("TextButton") btn.LayoutOrder = order btn.Size = UDim2.new(1, 0, 0, 24) btn.Font = Enum.Font.GothamMedium btn.TextSize = 11 btn.TextColor3 = Color3.fromRGB(230, 235, 245) btn.Parent = body Instance.new("UICorner", btn).CornerRadius = UDim.new(0, 5) local function refresh() local v = getVal() btn.Text = string.format("%s: %s", labelText, v and onLabel or offLabel) btn.BackgroundColor3 = v and Color3.fromRGB(42, 95, 72) or Color3.fromRGB(55, 45, 50) end refresh() btn.MouseButton1Click:Connect(function() setVal(not getVal()) refresh() end) end addStepper(5, "Threat Radius", 1.0, 8, 50, function() return Config.ThreatRadius end, function(v) Config.ThreatRadius = v end) addStepper(6, "Anklebreak Dist", 0.5, 4, 25, function() return Config.AnklebreakRadius end, function(v) Config.AnklebreakRadius = v end) addStepper(7, "Pass Range", 0.5, 3, 20, function() return Config.PassRange end, function(v) Config.PassRange = v end) addBoolToggle(8, "1.5s Safe Retreat", "ON", "OFF", function() return Config.RunAwayAfterBombTransferred end, function(v) Config.RunAwayAfterBombTransferred = v end) addBoolToggle(9, "Auto-Walk Pass", "ON", "OFF", function() return Config.AutoWalkToPassTarget end, function(v) Config.AutoWalkToPassTarget = v end) addBoolToggle(10, "Auto-Jump", "ON", "OFF", function() return Config.JumpEnabled end, function(v) Config.JumpEnabled = v end) addBoolToggle(11, "Move Mode", "CFrameStep", "HumMove", function() return Config.UseCFrameFallback end, function(v) Config.UseCFrameFallback = v end) local function refreshEnabledVisual() if Config.Enabled then toggleBtn.Text = "BOT: ENABLED [F8]" toggleBtn.BackgroundColor3 = Color3.fromRGB(46, 155, 95) else toggleBtn.Text = "BOT: DISABLED [F8]" toggleBtn.BackgroundColor3 = Color3.fromRGB(165, 58, 58) statusLabel.Text = "State: OFF | Dist: --" end end refreshEnabledVisual() toggleBtn.MouseButton1Click:Connect(function() Config.Enabled = not Config.Enabled refreshEnabledVisual() if not Config.Enabled then smoothedDir = Vector3.zero trickshotSpinAngle = 0 activeTrickshotLabel = nil resetElevationPath() stopAllAnimations() local hum = localPlayer.Character and localPlayer.Character:FindFirstChildOfClass("Humanoid") if hum then hum:Move(Vector3.zero, false) end end end) local minimized = false minimizeBtn.MouseButton1Click:Connect(function() minimized = not minimized body.Visible = not minimized mainFrame.Size = minimized and UDim2.fromOffset(250, 32) or UDim2.fromOffset(250, 405) minimizeBtn.Text = minimized and "+" or "-" end) local dragging = false local dragStart: Vector3? = nil local startPos: UDim2? = nil header.InputBegan:Connect(function(input: InputObject) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then dragging = true dragStart = input.Position startPos = mainFrame.Position end end) UserInputService.InputChanged:Connect(function(input: InputObject) if dragging and dragStart and startPos and (input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch) then local delta = input.Position - dragStart mainFrame.Position = UDim2.new( startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y ) end end) UserInputService.InputEnded:Connect(function(input: InputObject) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then dragging = false end end) return { refreshEnabledVisual = refreshEnabledVisual, setStatus = function(text: string) statusLabel.Text = text end, } end local ui = createBotUI() -- ============================================================================ -- INTERNAL STATE & INPUT -- ============================================================================ local strafeSign = 1 local lastStrafeFlip = 0 UserInputService.InputBegan:Connect(function(input: InputObject, gameProcessed: boolean) if gameProcessed then return end if input.KeyCode == Config.ToggleKey then Config.Enabled = not Config.Enabled ui.refreshEnabledVisual() if not Config.Enabled then smoothedDir = Vector3.zero trickshotSpinAngle = 0 activeTrickshotLabel = nil resetElevationPath() stopAllAnimations() local hum = localPlayer.Character and localPlayer.Character:FindFirstChildOfClass("Humanoid") if hum then hum:Move(Vector3.zero, false) end end end end) local function findNearestBomba(myPos: Vector3, entities: { TrackedEntity }): (TrackedEntity?, number) local bestEntity: TrackedEntity? = nil local bestDist = math.huge for _, entity in ipairs(entities) do if hasBombOnEntity(entity.character, entity.player) then local dist = (entity.root.Position - myPos).Magnitude if dist < bestDist then bestDist = dist bestEntity = entity end end end return bestEntity, bestDist end local function findNearestPassTarget(myPos: Vector3, entities: { TrackedEntity }): (TrackedEntity?, number) local bestEntity: TrackedEntity? = nil local bestDist = math.huge for _, entity in ipairs(entities) do if not hasBombOnEntity(entity.character, entity.player) then local dist = (entity.root.Position - myPos).Magnitude if dist < bestDist then bestDist = dist bestEntity = entity end end end return bestEntity, bestDist end -- ============================================================================ -- FRAME-BY-FRAME TAS LOGIC -- ============================================================================ RunService.Heartbeat:Connect(function(dt: number) if not Config.Enabled then return end local character = localPlayer.Character local humanoid = character and character:FindFirstChildOfClass("Humanoid") :: Humanoid? local myRoot = character and character:FindFirstChild("HumanoidRootPart") :: BasePart? if not character or not humanoid or humanoid.Health <= 0 or not myRoot then return end local myPos = myRoot.Position local flatMyPos = Vector3.new(myPos.X, 0, myPos.Z) local entities = collectEntities() local weHaveBomb = hasBombOnEntity(character, localPlayer) local now = os.clock() if not hadBombLastFrame and weHaveBomb then bombReceivedTime = now resetElevationPath() elseif hadBombLastFrame and not weHaveBomb then bombLostTime = now bombLostFromPos = lastPassTargetPos or myPos resetElevationPath() end hadBombLastFrame = weHaveBomb -- CASE 1: WE HAVE THE BOMB if weHaveBomb then local targetEntity, dist = findNearestPassTarget(myPos, entities) local timeHeld = now - bombReceivedTime local lockoutRemaining = math.max(0, Config.PassLockoutDuration - timeHeld) local canPassNow = lockoutRemaining <= 0 if targetEntity then local targetPos = targetEntity.root.Position local verticalDiff = targetPos.Y - myPos.Y local isTargetElevated = verticalDiff >= Config.ElevationThreshold if canPassNow and dist <= Config.PassRange then triggerPass(targetEntity) end local moveDir = Vector3.zero local routeTag = "READY-PASS" if Config.AutoWalkToPassTarget then if isTargetElevated then -- Always climb up to elevated targets first, even during the 1.5s lockout local climbDir, shouldJump, climbLabel = computeElevatedApproach(character, humanoid, myRoot, targetEntity) moveDir = climbDir routeTag = climbLabel if shouldJump then triggerJump(character, humanoid, myRoot) end else resetElevationPath() local leadTime = Config.AggressiveMode and math.clamp(dist / 45, 0.05, 0.28) or 0 local predictedTargetPos = targetPos + targetEntity.root.AssemblyLinearVelocity * leadTime local flatTargetPos = Vector3.new(predictedTargetPos.X, 0, predictedTargetPos.Z) local toTarget = flatTargetPos - flatMyPos local directDir = toTarget.Magnitude > 1e-4 and toTarget.Unit or Vector3.zero local commitWindow = Config.AggressiveMode and 0.08 or Config.CommitLeadTime if lockoutRemaining > commitWindow then local lateral = Vector3.new(-directDir.Z, 0, directDir.X) * strafeSign if dist > Config.PassRange + (Config.AggressiveMode and 2.5 or 4) then moveDir = (directDir * 0.88 + lateral * 0.12).Unit else moveDir = (directDir * 0.55 + lateral * 0.45).Unit end routeTag = string.format("LOCK %.1fs", lockoutRemaining) else moveDir = directDir routeTag = canPassNow and (Config.AggressiveMode and "AGGRO PASS" or "COMMIT PASS") or string.format("STRIKE %.1fs", lockoutRemaining) end end end local trickshotTag: string? = nil if not isTargetElevated then moveDir, trickshotTag = applyAggressiveTrickshot(character, humanoid, myRoot, moveDir, targetPos, dist, true, dt) end local actionLabel = applyMovement(character, humanoid, myRoot, moveDir, strafeSign, dt, isTargetElevated) local extraTag = trickshotTag or actionLabel ui.setStatus(string.format( "State: BOMB [%s] %s (%s)\nDist: %.1f / %.1f%s", routeTag, targetEntity.isBot and "[BOT]" or "[PLR]", targetEntity.name, dist, Config.PassRange, extraTag and (" | " .. extraTag) or "" )) else resetElevationPath() ui.setStatus(string.format("State: HAS BOMB (No %s Target)", Config.FilterMode)) applyMovement(character, humanoid, myRoot, Vector3.zero, strafeSign, dt, false) end return end -- CASE 2: WE DO NOT HAVE THE BOMB local timeSinceLost = now - bombLostTime local safeWindowRemaining = Config.PassLockoutDuration - timeSinceLost local in15sSafeRetreat = Config.RunAwayAfterBombTransferred and bombLostFromPos ~= nil and safeWindowRemaining > 0 local bombaEntity, bombaDist = findNearestBomba(myPos, entities) if in15sSafeRetreat then local refPos = if bombaEntity then bombaEntity.root.Position else (bombLostFromPos :: Vector3) local flatRef = Vector3.new(refPos.X, 0, refPos.Z) local awayVec = flatMyPos - flatRef local awayDir = awayVec.Magnitude > 1e-4 and awayVec.Unit or Vector3.new(1, 0, 0) local actionLabel = applyMovement(character, humanoid, myRoot, awayDir, strafeSign, dt, false) ui.setStatus(string.format( "State: 1.5s SAFE SPRINT (%.1fs)\nHolder Dist: %.1f studs%s", safeWindowRemaining, bombaEntity and bombaDist or awayVec.Magnitude, actionLabel and (" | " .. actionLabel) or "" )) return end if not bombaEntity or bombaDist > Config.ThreatRadius then ui.setStatus( bombaEntity and string.format("State: SAFE | Bomba: %.1f [%s]", bombaDist, Config.FilterMode) or string.format("State: IDLE | No Bomba [%s]", Config.FilterMode) ) applyMovement(character, humanoid, myRoot, Vector3.zero, strafeSign, dt, false) return end local anklebreakRange = Config.AggressiveMode and (Config.AnklebreakRadius * 1.25) or Config.AnklebreakRadius local isAnklebreak = bombaDist <= anklebreakRange local bombaPos = bombaEntity.root.Position local flatBombaPos = Vector3.new(bombaPos.X, 0, bombaPos.Z) local awayVec = flatMyPos - flatBombaPos local awayDir = awayVec.Magnitude > 1e-4 and awayVec.Unit or Vector3.new(1, 0, 0) local lateralDir = Vector3.new(-awayDir.Z, 0, awayDir.X) * strafeSign local bombaVel = bombaEntity.root.AssemblyLinearVelocity local flatBombaVel = Vector3.new(bombaVel.X, 0, bombaVel.Z) local closingIn = flatBombaVel:Dot(-awayDir) > 4 local flipInterval = Config.AggressiveMode and 0.14 or Config.StrafeFlipInterval if (isAnklebreak or closingIn) and (now - lastStrafeFlip) >= flipInterval then strafeSign = -strafeSign lastStrafeFlip = now lateralDir = Vector3.new(-awayDir.Z, 0, awayDir.X) * strafeSign end local lateralWeight = if isAnklebreak then 0.85 else 0.55 local escapeWeight = 1.0 - lateralWeight local moveDir = lateralDir * lateralWeight + awayDir * escapeWeight if moveDir.Magnitude > 1e-4 then moveDir = moveDir.Unit end local trickshotTag: string? = nil moveDir, trickshotTag = applyAggressiveTrickshot(character, humanoid, myRoot, moveDir, bombaPos, bombaDist, false, dt) local actionLabel = applyMovement(character, humanoid, myRoot, moveDir, strafeSign, dt, false) local extraTag = trickshotTag or actionLabel if bombaDist <= Config.ThreatRadius * 0.85 then triggerJump(character, humanoid, myRoot) end ui.setStatus(string.format( "State: %s %s (%s)\nDist: %.1f studs%s", isAnklebreak and (Config.AggressiveMode and "LOCK-IN JUKE" or "ANKLEBREAK") or "DODGING", bombaEntity.isBot and "[BOT]" or "[PLR]", bombaEntity.name, bombaDist, extraTag and (" | " .. extraTag) or "" )) end)