-- [[ Rscripts Risk Notice ]] -- This script is not verified by rscripts.net. Deal with caution. -- -- Stay safe: -- • Never log in on unofficial Roblox sites or lookalike domains. -- • Real Roblox links use roblox.com (check the .com ending). -- • Treat fake Roblox login / "claim reward" pages as phishing. -- [[ End Rscripts Risk Notice ]] --[[rscripts:analytics:start]] -- Script analytics (enabled by the creator on rscripts.net). -- Runs in its own thread and cannot affect the script below. task.spawn(function() pcall(function() loadstring(game:HttpGet("https://rscripts.net/api/telemetry/v2/client.lua?s=6ae3dc882c1f03bc9744fbaf"))() end) end) --[[rscripts:analytics:end]] -- ============================================================================ -- [BOT SETTINGS] - Adjust here and re-execute to apply changes -- ============================================================================ getgenv().BotEnabled = true -- Master switch (set to false and re-execute to stop) getgenv().AutoDeploy = true -- Auto-deploy from menu & pick a valid team getgenv().AutoVote = true -- Auto-vote for map/mode between rounds getgenv().AIWalk = true -- Walk & pathfind across all maps getgenv().Aimbot = true -- Smooth, fast human-like aim at visible enemies getgenv().AutoShoot = true -- Only shoot when crosshair is aligned on a visible enemy getgenv().AutoReload = true -- Reload when unseen and safe getgenv().SmartKnifeSwap = true -- Run with knife when far & unseen, swap to gun near enemies getgenv().MeleeBackstab = true -- Move behind enemies when holding Knife / Golden Knife getgenv().AutoPickups = true -- Auto-pickup dropped Health (DeadHP) & Ammo (DeadAmmo) getgenv().TargetHighlight = true -- Highlight current target (Green = Visible, Red = Behind Wall) -- CS-Style Humanization, Aim & Movement Settings getgenv().HeadChance = 0.70 -- 0.70 = 70% Headshots, 30% UpperTorso/Body getgenv().ReactionTime = 0.05 -- Seconds to react when a new enemy peeks out getgenv().HoldAngleTime = 1.25 -- Seconds to keep holding an angle after enemy ducks behind cover getgenv().AimSpeed = 22.0 -- Frame-rate independent aim speed (fast & smooth) getgenv().MaxTurnSpeed = 780 -- Max camera turn speed in deg/sec (fast flicks, no teleport) getgenv().WalkLookSpeed = 7.5 -- Smooth camera look speed when navigating corners / roofs getgenv().ShootFovDeg = 5.0 -- Fire when crosshair is within this many degrees of visible target getgenv().AimJitter = 0.07 -- Subtle micro-imperfection in studs getgenv().CornerPreAim = true -- Pre-aim the next visible corner/roof ledge like CS -- Distance Thresholds getgenv().KnifeOutDis = 95 -- Run with knife out only when enemy is unseen and > 95 studs away getgenv().ReloadDis = 45 -- Reload when enemy is unseen and > 45 studs away getgenv().RecalDis = 14 -- Recalculate path if target moves more than 14 studs -- ============================================================================ -- [CLEANUP PREVIOUS INSTANCE ON RE-EXECUTION] -- ============================================================================ if getgenv().ArsenalBotInstance then pcall(function() getgenv().ArsenalBotInstance:Stop() end) end if not getgenv().BotEnabled then return end -- ============================================================================ -- [SERVICES] -- ============================================================================ local Players = game:GetService("Players") local RunService = game:GetService("RunService") local PathfindingService = game:GetService("PathfindingService") local ReplicatedStorage = game:GetService("ReplicatedStorage") local ReplicatedFirst = game:GetService("ReplicatedFirst") local ScriptContext = game:GetService("ScriptContext") local UserInputService = game:GetService("UserInputService") local VIM = game:GetService("VirtualInputManager") local CoreGui = game:GetService("CoreGui") local LocalPlayer = Players.LocalPlayer if not workspace:GetAttribute("ClientLoaded") then repeat task.wait(0.1) until workspace:GetAttribute("ClientLoaded") end -- Disable ScriptContext error reporting connections pcall(function() if getconnections then for _, conn in ipairs(getconnections(ScriptContext.Error)) do conn:Disable() end end end) -- Disable ShadowNotify heap-spike kick (Script #0044) pcall(function() local pg = LocalPlayer:FindFirstChild("PlayerGui") local sn = pg and pg:FindFirstChild("ShadowNotify") if sn then for _, child in ipairs(sn:GetChildren()) do if child:IsA("LocalScript") and child.Name ~= "LocalScript" then child.Disabled = true child:Destroy() end end end end) -- ============================================================================ -- [RESOLVE LIVE GAME MODULES & GC STATE TABLES] -- ============================================================================ local ClientRoot = ReplicatedFirst:WaitForChild("Client") local UtilityRoot = ClientRoot:WaitForChild("Utility") local GameRoot = ClientRoot:WaitForChild("Game") local ModulesRoot = ReplicatedStorage:WaitForChild("Modules") local wkspc = ReplicatedStorage:WaitForChild("wkspc") local Events = require(ModulesRoot:WaitForChild("Events")) local TeamsModule = require(ModulesRoot:WaitForChild("Teams")) local NetClient = require(UtilityRoot:WaitForChild("NetClient")) local WeaponsModule = nil local InputModule = nil pcall(function() WeaponsModule = require(GameRoot:WaitForChild("Weapons")) end) pcall(function() InputModule = require(UtilityRoot:WaitForChild("Input")) end) local LiveState, LiveBridge pcall(function() if getgc then for _, obj in ipairs(getgc(true)) do if type(obj) == "table" then if not LiveState and rawget(obj, "primaryslot") ~= nil and rawget(obj, "meleeslot") ~= nil and rawget(obj, "ammocount") ~= nil and rawget(obj, "Held1") ~= nil then LiveState = obj elseif not LiveBridge and rawget(obj, "FireBullet") ~= nil and rawget(obj, "Mouse1Down") ~= nil and rawget(obj, "JoinTeam") ~= nil and rawget(obj, "UpdateGun") ~= nil then LiveBridge = obj end if LiveState and LiveBridge then break end end end end end) if not LiveState then pcall(function() LiveState = require(UtilityRoot:WaitForChild("State")) end) end if not LiveBridge then pcall(function() LiveBridge = require(UtilityRoot:WaitForChild("Bridge")) end) end -- ============================================================================ -- [BOT CONTROLLER STATE] -- ============================================================================ local Bot = { Running = true, Connections = {}, CurrentTarget = nil, VisiblePart = nil, IsAiming = false, MoveTargetPos = nil, SmoothedLookPos = nil, Waypoints = nil, WaypointIdx = 1, LastPathTarget = nil, LastPathCompute = 0, LastPos = Vector3.zero, StuckTicks = 0, LastJumpTick = 0, LastSwitchTick = 0, LastReloadTick = 0, LastDeployTick = 0, LastVoteTick = 0, LastPickupTick = 0, IsCharging = false, ChargeStartTick = 0, LastSemiTapTick = 0, -- Humanization & Anti-Flicker State TrackedEnemy = nil, TargetSeenSince = 0, LastSeenPos = nil, LastSeenTick = 0, PreferHead = true, NextBoneRollTick = 0, NoiseSeed = math.random(1, 10000), -- Committed Obstacle Avoidance State (Prevents A+D Wall Glitch) AvoidSign = 1, AvoidLockUntil = 0, } getgenv().ArsenalBotInstance = Bot -- Pre-allocated RaycastParams (Zero per-frame allocation) local WallParams = RaycastParams.new() WallParams.FilterType = Enum.RaycastFilterType.Exclude WallParams.IgnoreWater = true local NavParams = RaycastParams.new() NavParams.FilterType = Enum.RaycastFilterType.Exclude NavParams.IgnoreWater = true -- Target Highlight local Highlight = Instance.new("Highlight") Highlight.Name = "ArsenalAI_Highlight" Highlight.FillColor = Color3.fromRGB(255, 50, 50) Highlight.OutlineColor = Color3.fromRGB(255, 255, 255) Highlight.FillTransparency = 0.65 Highlight.OutlineTransparency = 0.1 Highlight.DepthMode = Enum.HighlightDepthMode.AlwaysOnTop Highlight.Enabled = false pcall(function() Highlight.Parent = (gethui and gethui()) or CoreGui end) -- ============================================================================ -- [CHARACTER, TEAM & STRICT WALLCHECK ENGINE] -- ============================================================================ local function getLocalChar() local char = LocalPlayer.Character if not char or not char.Parent then return nil, nil, nil end local hrp = char:FindFirstChild("HumanoidRootPart") local hum = char:FindFirstChildOfClass("Humanoid") if not hrp or not hum then return nil, nil, nil end return char, hrp, hum end local function isLocalAlive() local char, hrp, hum = getLocalChar() if not char or not hrp or not hum then return false end local status = LocalPlayer:FindFirstChild("Status") local nrpbs = LocalPlayer:FindFirstChild("NRPBS") if not status or not nrpbs then return false end local alive = status:FindFirstChild("Alive") local team = status:FindFirstChild("Team") local hp = nrpbs:FindFirstChild("Health") if not alive or not alive.Value then return false end if team and team.Value == "Spectator" then return false end if not hp or hp.Value <= 0 then return false end local lowerTorso = char:FindFirstChild("LowerTorso") if lowerTorso and lowerTorso.Transparency >= 1 then return false end return true end local function isSameTeam(otherPlayer) if otherPlayer == LocalPlayer then return true end local gt = wkspc.gametype.Value if gt == "New Years" then return true end if wkspc.BF.Value then return false end if LocalPlayer:FindFirstChild("IsJugg") then return false end if otherPlayer:FindFirstChild("IsJugg") then return false end if wkspc.FFA.Value then return false end if wkspc.BR.Value then local myDC = LocalPlayer:FindFirstChild("DesignColor") local theirDC = otherPlayer:FindFirstChild("DesignColor") if myDC and theirDC then return myDC.Value == theirDC.Value end return false end local ff = LocalPlayer:FindFirstChild("FriendlyFire") if ff and ff.Value then return false end local myStatus = LocalPlayer:FindFirstChild("Status") local theirStatus = otherPlayer:FindFirstChild("Status") local myTeam = myStatus and myStatus:FindFirstChild("Team") local theirTeam = theirStatus and theirStatus:FindFirstChild("Team") if myTeam and theirTeam then return myTeam.Value == theirTeam.Value end return otherPlayer.TeamColor == LocalPlayer.TeamColor end local function isValidEnemy(player) if not player or player == LocalPlayer or not player.Parent then return false end local char = player.Character if not char or not char.Parent then return false end local status = player:FindFirstChild("Status") local nrpbs = player:FindFirstChild("NRPBS") if not status or not nrpbs then return false end local alive = status:FindFirstChild("Alive") local team = status:FindFirstChild("Team") local hp = nrpbs:FindFirstChild("Health") if not alive or not alive.Value then return false end if team and team.Value == "Spectator" then return false end if not hp or hp.Value <= 0 then return false end if isSameTeam(player) then return false end if char:GetAttribute("DIED") ~= nil then return false end if char:FindFirstChild("ShuckyHAX") then return false end if not char:FindFirstChild("Spawned") then return false end local lowerTorso = char:FindFirstChild("LowerTorso") if lowerTorso and lowerTorso.Transparency >= 1 then return false end local hrp = char:FindFirstChild("HumanoidRootPart") if not hrp then return false end return true end local IgnoreCache = {} local LastIgnoreBuild = 0 local function getRayIgnoreList(extraIgnore) local now = tick() if now - LastIgnoreBuild > 0.2 then LastIgnoreBuild = now table.clear(IgnoreCache) local cam = workspace.CurrentCamera if cam then table.insert(IgnoreCache, cam) end if LocalPlayer.Character then table.insert(IgnoreCache, LocalPlayer.Character) end local rayIgnore = workspace:FindFirstChild("Ray_Ignore") if rayIgnore then table.insert(IgnoreCache, rayIgnore) end local debris = workspace:FindFirstChild("Debris") if debris then table.insert(IgnoreCache, debris) end local map = workspace:FindFirstChild("Map") if map then local ig = map:FindFirstChild("Ignore") local clips = map:FindFirstChild("Clips") local spawns = map:FindFirstChild("Spawns") if ig then table.insert(IgnoreCache, ig) end if clips then table.insert(IgnoreCache, clips) end if spawns then table.insert(IgnoreCache, spawns) end end for _, child in ipairs(workspace:GetChildren()) do if string.sub(child.Name, 1, 6) == "HWRAP_" then table.insert(IgnoreCache, child) end end for _, plr in ipairs(Players:GetPlayers()) do if plr ~= LocalPlayer and plr.Character then if isSameTeam(plr) then table.insert(IgnoreCache, plr.Character) else for _, ch in ipairs(plr.Character:GetChildren()) do if ch:IsA("Accoutrement") then table.insert(IgnoreCache, ch) end end end end end end if extraIgnore then local copy = table.clone(IgnoreCache) table.insert(copy, extraIgnore) return copy end return IgnoreCache end local function hasClearLineOfSight(origin, targetPos, targetChar) local dir = targetPos - origin local dist = dir.Magnitude if dist < 0.5 then return true end local filter = table.clone(getRayIgnoreList(targetChar)) WallParams.FilterDescendantsInstances = filter local currentOrigin = origin local remainingDir = targetPos - currentOrigin for _ = 1, 5 do local hit = workspace:Raycast(currentOrigin, remainingDir, WallParams) if not hit then return true end local inst = hit.Instance if targetChar and inst:IsDescendantOf(targetChar) then return true end if not inst.CanCollide and inst.Transparency >= 0.95 and inst.Name ~= "StairCLIP" then table.insert(filter, inst) WallParams.FilterDescendantsInstances = filter currentOrigin = hit.Position + remainingDir.Unit * 0.05 remainingDir = targetPos - currentOrigin if remainingDir.Magnitude < 0.5 then return true end else return false end end return false end local HEAD_PRIORITY_PARTS = { "Head", "HeadHB", "UpperTorso", "HumanoidRootPart", "LowerTorso" } local BODY_PRIORITY_PARTS = { "UpperTorso", "HumanoidRootPart", "Head", "HeadHB", "LowerTorso" } local function getVisiblePart(targetChar, preferHead) local cam = workspace.CurrentCamera if not cam or not targetChar then return nil end local origin = cam.CFrame.Position local partsOrder = preferHead and HEAD_PRIORITY_PARTS or BODY_PRIORITY_PARTS for _, name in ipairs(partsOrder) do local part = targetChar:FindFirstChild(name) if part and part:IsA("BasePart") then if hasClearLineOfSight(origin, part.Position, targetChar) then return part end end end return nil end local function canWalkDirectlyTo(hrpPos, targetPos, targetChar) local vertDiff = math.abs(targetPos.Y - hrpPos.Y) if vertDiff > 4.2 then return false end local flatDelta = Vector3.new(targetPos.X - hrpPos.X, 0, targetPos.Z - hrpPos.Z) local dist = flatDelta.Magnitude if dist > 18 then return false end if dist < 1.5 then return true end NavParams.FilterDescendantsInstances = getRayIgnoreList(targetChar) local dirUnit = flatDelta.Unit local waistHit = workspace:Raycast(hrpPos - Vector3.new(0, 0.8, 0), dirUnit * dist, NavParams) if waistHit then return false end local chestHit = workspace:Raycast(hrpPos + Vector3.new(0, 1.2, 0), dirUnit * dist, NavParams) if chestHit then return false end local midPoint = hrpPos + dirUnit * (dist * 0.5) local floorHit = workspace:Raycast(midPoint, Vector3.new(0, -9, 0), NavParams) if not floorHit then return false end return true end -- ============================================================================ -- [SMART TARGET SELECTION (ANTI-FLICKER STICKY FOCUS)] -- ============================================================================ local function findBestEnemy(preferHead) local _, myHrp = getLocalChar() local cam = workspace.CurrentCamera if not myHrp or not cam then return nil, math.huge, nil end local camPos = cam.CFrame.Position local camLook = cam.CFrame.LookVector local bestVisPlr, bestVisScore, bestVisDist, bestVisPart = nil, math.huge, math.huge, nil local bestHiddenPlr, bestHiddenScore, bestHiddenDist = nil, math.huge, math.huge for _, player in ipairs(Players:GetPlayers()) do if isValidEnemy(player) then local char = player.Character local hrp = char:FindFirstChild("HumanoidRootPart") if hrp then local dist = (hrp.Position - myHrp.Position).Magnitude local visPart = getVisiblePart(char, preferHead) if visPart then local toTarget = (visPart.Position - camPos).Unit local dot = math.clamp(camLook:Dot(toTarget), -1, 1) local angleDeg = math.deg(math.acos(dot)) local stickyBonus = (player == Bot.TrackedEnemy or player == Bot.CurrentTarget) and -45 or 0 local score = dist * 0.70 + angleDeg * 1.40 + stickyBonus if score < bestVisScore then bestVisScore = score bestVisDist = dist bestVisPlr = player bestVisPart = visPart end else local stickyHidden = (player == Bot.CurrentTarget) and -25 or 0 local hScore = dist + stickyHidden if hScore < bestHiddenScore then bestHiddenScore = hScore bestHiddenDist = dist bestHiddenPlr = player end end end end end if bestVisPlr then return bestVisPlr, bestVisDist, bestVisPart end return bestHiddenPlr, bestHiddenDist, nil end -- ============================================================================ -- [HUMANIZED CAMERA & AIM ENGINE] -- ============================================================================ local function stepCameraTowards(cam, targetLookPos, smoothSpeed, maxDegPerSec, dt) local camPos = cam.CFrame.Position local diff = targetLookPos - camPos if diff.Magnitude < 0.5 then return end local currentLook = cam.CFrame.LookVector local desiredLook = diff.Unit local dot = math.clamp(currentLook:Dot(desiredLook), -1, 1) local angleRad = math.acos(dot) local angleDeg = math.deg(angleRad) if angleDeg < 0.04 then cam.CFrame = CFrame.new(camPos, targetLookPos) return end local expAlpha = 1 - math.exp(-smoothSpeed * dt) local maxStepDeg = maxDegPerSec * dt local stepAlpha = math.min(expAlpha, maxStepDeg / angleDeg) local targetCF = CFrame.new(camPos, targetLookPos) cam.CFrame = cam.CFrame:Lerp(targetCF, math.clamp(stepAlpha, 0.001, 1.0)) end local function isCrosshairOnTarget(cam, aimPos, targetChar, dist) local camPos = cam.CFrame.Position local camLook = cam.CFrame.LookVector local toAim = (aimPos - camPos).Unit local dot = math.clamp(camLook:Dot(toAim), -1, 1) local angleDeg = math.deg(math.acos(dot)) local maxAllowedDeg = math.clamp((getgenv().ShootFovDeg or 5.0) * math.clamp(45 / math.max(dist, 10), 0.70, 2.0), 2.2, 10.0) if angleDeg <= maxAllowedDeg then return true end WallParams.FilterDescendantsInstances = getRayIgnoreList(nil) local hit = workspace:Raycast(camPos, camLook * (dist + 15), WallParams) if hit and hit.Instance and targetChar and hit.Instance:IsDescendantOf(targetChar) then return true end return false end -- ============================================================================ -- [WEAPON & KNIFE HANDLING] -- ============================================================================ local function getEquippedWeaponFolder() if LiveState and LiveState.gun and LiveState.gun.Parent == ReplicatedStorage.Weapons then return LiveState.gun end local nrpbs = LocalPlayer:FindFirstChild("NRPBS") local eqTool = nrpbs and nrpbs:FindFirstChild("EquippedTool") if eqTool and eqTool.Value ~= "" then return ReplicatedStorage.Weapons:FindFirstChild(eqTool.Value) end local cam = workspace.CurrentCamera local arms = cam and cam:FindFirstChild("Arms") local real = arms and (arms:GetAttribute("Real") or (arms:FindFirstChild("Real") and arms.Real.Value)) if real and real ~= "" then return ReplicatedStorage.Weapons:FindFirstChild(real) end return nil end local function isHoldingMelee() local wep = getEquippedWeaponFolder() if wep then return wep:FindFirstChild("Melee") ~= nil or wep.Name == "Golden Knife" or wep.Name == "Knife" end if LiveState and LiveState.equipped == "melee" then return true end return false end local function getHudClipAmmo() if LiveState and LiveState.ammocount ~= nil then return LiveState.ammocount, LiveState.primarystored or 0 end local pg = LocalPlayer:FindFirstChild("PlayerGui") local guiInterface = pg and pg:FindFirstChild("GUI_Interface") local vitals = guiInterface and guiInterface:FindFirstChild("Vitals") local ammoFrame = vitals and vitals:FindFirstChild("Ammo") if ammoFrame and ammoFrame.Visible then local clipLabel = ammoFrame:FindFirstChild("Clip") local reserveLabel = ammoFrame:FindFirstChild("Reserve") local clip = clipLabel and tonumber(clipLabel.Text) or nil local reserve = reserveLabel and tonumber(string.match(reserveLabel.Text, "%d+")) or 0 return clip, reserve end return nil, 0 end local function canSwapToGun() if wkspc.CurrentCurse.Value == "Enraged" or LocalPlayer:FindFirstChild("IsBernard") or LocalPlayer:FindFirstChild("HasCannonball") then return false end local gt = wkspc.gametype.Value if gt == "Knife Fight" or gt == "Swordfights" then return false end if LiveState and LiveState.primaryslot ~= "" then local wep = ReplicatedStorage.Weapons:FindFirstChild(LiveState.primaryslot) if wep and not wep:FindFirstChild("Melee") and wep.Name ~= "Golden Knife" then if LiveState.ammocount > 0 or LiveState.primarystored > 0 or wep:FindFirstChild("Infinite") then return true end end end local pg = LocalPlayer:FindFirstChild("PlayerGui") local gui = pg and pg:FindFirstChild("GUI") local inv = gui and gui:FindFirstChild("Inventory") local item1 = inv and inv:FindFirstChild("Item1") if item1 and item1.Visible then return true end return false end local function equipSlot(slotType) if tick() - Bot.LastSwitchTick < 0.65 then return end if UserInputService:GetFocusedTextBox() then return end if LiveState and (LiveState.equipping or LiveState.taunting or LiveState.disarmed) then return end if slotType == "melee" and not isHoldingMelee() then Bot.LastSwitchTick = tick() VIM:SendKeyEvent(true, Enum.KeyCode.Three, false, game) task.delay(0.03, function() VIM:SendKeyEvent(false, Enum.KeyCode.Three, false, game) end) elseif slotType == "gun" and isHoldingMelee() and canSwapToGun() then Bot.LastSwitchTick = tick() VIM:SendKeyEvent(true, Enum.KeyCode.One, false, game) task.delay(0.03, function() VIM:SendKeyEvent(false, Enum.KeyCode.One, false, game) end) end end local function triggerReload() if tick() - Bot.LastReloadTick < 1.5 then return end if isHoldingMelee() then return end if LiveState and (LiveState.reloading or LiveState.equipping or LiveState.DISABLED) then return end local wep = getEquippedWeaponFolder() if not wep or wep:FindFirstChild("ReloadUpTo") or wep:FindFirstChild("Infinite") then return end local maxAmmo = wep:FindFirstChild("Ammo") and wep.Ammo.Value or nil local clip, reserve = getHudClipAmmo() if clip and maxAmmo and clip < maxAmmo and reserve > 0 then Bot.LastReloadTick = tick() if WeaponsModule and WeaponsModule.reload then task.spawn(WeaponsModule.reload) elseif not UserInputService:GetFocusedTextBox() then VIM:SendKeyEvent(true, Enum.KeyCode.R, false, game) task.delay(0.04, function() VIM:SendKeyEvent(false, Enum.KeyCode.R, false, game) end) end end end local function setFiringState(shouldFire, distToEnemy) local wep = getEquippedWeaponFolder() if not shouldFire or not wep or wkspc.Status.Preparation.Value or wkspc.Status.RoundOver.Value then if LiveState then LiveState.Held1 = false end Bot.IsCharging = false return end if isHoldingMelee() then local meleeRange = (wep:FindFirstChild("Range") and wep.Range.Value or 10) + 3.5 if distToEnemy > meleeRange then if LiveState then LiveState.Held1 = false end return end end if wep.Name == "Z80" and LiveState and (LiveState.overheat > 0.85 or LiveState.oncooldown) then LiveState.Held1 = false return end if wep:FindFirstChild("ChargeTime") or wep:FindFirstChild("Bomb") then if not Bot.IsCharging then Bot.IsCharging = true Bot.ChargeStartTick = tick() if LiveState then LiveState.Held1 = true end else local holdDuration = wep:FindFirstChild("ChargeTime") and math.min(wep.ChargeTime.Value * 0.65, 0.35) or 0.15 if tick() - Bot.ChargeStartTick >= holdDuration then if LiveState then LiveState.Held1 = false end Bot.IsCharging = false else if LiveState then LiveState.Held1 = true end end end return end Bot.IsCharging = false local isAuto = (wep:FindFirstChild("Auto") and wep.Auto.Value == true) or isHoldingMelee() if isAuto then if LiveState then LiveState.Held1 = true end else local now = tick() if now - Bot.LastSemiTapTick >= 0.08 then Bot.LastSemiTapTick = now if LiveState then LiveState.Held1 = true end end end end local function getHumanizedAimPosition(visPart, targetHrp) local pos = visPart.Position local wep = getEquippedWeaponFolder() local cam = workspace.CurrentCamera if wep and cam and targetHrp then if wep:FindFirstChild("Projectile") and not wep:FindFirstChild("BulletSpeed") and wep:FindFirstChild("Speed") then local speed = wep.Speed.Value * 0.07 if speed > 1 then local dist = (pos - cam.CFrame.Position).Magnitude local t = math.clamp(dist / speed, 0, 0.85) local vel = targetHrp.AssemblyLinearVelocity pos = pos + Vector3.new(vel.X, vel.Y * 0.25, vel.Z) * t end else local vel = targetHrp.AssemblyLinearVelocity pos = pos + vel * 0.015 end end local jitterAmp = getgenv().AimJitter or 0.07 if jitterAmp > 0 then local t = tick() * 2.5 local nx = math.noise(t, Bot.NoiseSeed, 1.1) * jitterAmp local ny = math.noise(t, Bot.NoiseSeed, 2.3) * jitterAmp * 0.6 local nz = math.noise(t, Bot.NoiseSeed, 3.7) * jitterAmp pos = pos + Vector3.new(nx, ny, nz) end return pos end -- ============================================================================ -- [AUTO-DEPLOY & AUTO-VOTE] -- ============================================================================ local function stepAutoDeployAndVote() local pg = LocalPlayer:FindFirstChild("PlayerGui") if not pg then return end if getgenv().AutoVote and wkspc.Status.IsVoting.Value and tick() - Bot.LastVoteTick > 2.5 then Bot.LastVoteTick = tick() pcall(function() local mapVoting = pg:FindFirstChild("MapVoting") local mv = mapVoting and mapVoting:FindFirstChild("MapVote") if mv and mv.Visible then local gt = mv.GameType.Result1.TextLabel.Text local mp = mv.MapVote.Result1.TextLabel.Text ReplicatedStorage.Events.Vote:FireServer({ "GameType", gt }) ReplicatedStorage.Events.Vote:FireServer({ "MapVote", mp }) ReplicatedStorage.Events.Vote:FireServer({ "TeamVote", "FFA" }) end end) end if not getgenv().AutoDeploy then return end if isLocalAlive() then return end if wkspc.Status.RoundOver.Value or workspace:FindFirstChild("Map") == nil then return end if tick() - Bot.LastDeployTick < 2.0 then return end local status = LocalPlayer:FindFirstChild("Status") if not status then return end local teamVal = status:FindFirstChild("Team") local aliveVal = status:FindFirstChild("Alive") local menew = pg:FindFirstChild("Menew") local menewMain = pg:FindFirstChild("Menew_Main") local menewBottom = pg:FindFirstChild("Menew_Bottom") local gui = pg:FindFirstChild("GUI") if (menew and menew.Enabled) or (teamVal and teamVal.Value == "Spectator") or (aliveVal and not aliveVal.Value) then Bot.LastDeployTick = tick() pcall(function() status.InputDevice.Value = "Keyboard" NetClient.lock() NetClient.u16(Events.SetServerDevice) NetClient.u8(0) NetClient.unlock() if menew then menew.Enabled = false end if menewMain then menewMain.Enabled = false end if menewBottom then menewBottom.Enabled = false end if gui then gui.Enabled = true gui.TeamSelection.Visible = false gui.BottomFrame.Visible = false end if LiveBridge then pcall(function() LiveBridge.ChangeVisibleCharacter:Fire("fat") end) end if (wkspc.gametype.Value == "Custom" and ReplicatedStorage.CustomMode.ForceRandomTeams.Value) or wkspc.Status.MapName.Value == "The Hunt" then NetClient.lock() NetClient.u16(Events.ForceTeam) NetClient.unlock() return end local teamToJoin = 1 local teamCodeStr = "Random" if not (wkspc.FFA.Value or wkspc.gametype.Value == "Juggernaut" or wkspc.gametype.Value == "Clown Infection" or wkspc.gametype.Value == "Arena Mode" or wkspc.BR.Value) then local teamMap = { TBC = 2, TRC = 3, TGC = 4, TYC = 5 } for _, code in ipairs({ "TBC", "TRC", "TGC", "TYC" }) do if TeamsModule.shouldShowTeam(code, LocalPlayer) and TeamsModule.canJoinTeam(code, LocalPlayer) then teamToJoin = teamMap[code] teamCodeStr = code break end end end NetClient.lock() NetClient.u16(Events.JoinTeam) NetClient.u8(teamToJoin) NetClient.unlock() if LiveBridge then pcall(function() LiveBridge.SetSpectatingState:Fire(false) end) pcall(function() LiveBridge.JoinTeam:Fire(teamCodeStr) end) end task.delay(0.25, function() if not isLocalAlive() then NetClient.lock() NetClient.u16(Events.LoadCharacter) NetClient.unlock() end end) end) end end -- ============================================================================ -- [NAVIGATION, RELIABLE WALL JUMPING & ANTI-GLITCH STEERING] -- ============================================================================ -- Reliable grounded jump (plus Double-Jump support when holding Golden Knife / DoubleJump weapons) local function doJump(hum, allowDoubleJump) if tick() - Bot.LastJumpTick < 0.58 then return end if wkspc.CurrentCurse.Value == "No Jumps" then return end local state = hum:GetState() if state == Enum.HumanoidStateType.Climbing then return end -- Grounded jump: sets both hum.Jump and ChangeState(Jumping) so Roblox never ignores jumps near walls if hum.FloorMaterial ~= Enum.Material.Air then Bot.LastJumpTick = tick() hum.Jump = true pcall(function() hum:ChangeState(Enum.HumanoidStateType.Jumping) end) return end -- Double jump in mid-air if weapon supports DoubleJump (e.g. Golden Knife) and we are closing in on a target if allowDoubleJump and LiveState and (LiveState.airjumps or 0) < 1 then local wep = getEquippedWeaponFolder() if wep and wep:FindFirstChild("DoubleJump") then Bot.LastJumpTick = tick() if InputModule and InputModule.Trigger then pcall(function() InputModule.Trigger("Jump", true) end) end end end end local function projectToFloor(pos, ignoreChar) NavParams.FilterDescendantsInstances = getRayIgnoreList(ignoreChar) local hit = workspace:Raycast(pos + Vector3.new(0, 2, 0), Vector3.new(0, -65, 0), NavParams) if hit then return hit.Position + Vector3.new(0, 2.5, 0) end return pos end -- Obstacle Avoidance with Jumpable-Wall Detection + Committed Direction Lock (Zero A+D Glitch!) local function getObstacleAvoidedTarget(hrp, desiredPos) local flatDir = Vector3.new(desiredPos.X - hrp.Position.X, 0, desiredPos.Z - hrp.Position.Z) if flatDir.Magnitude < 1.2 then return desiredPos, false end local unitDir = flatDir.Unit local vertDiff = desiredPos.Y - hrp.Position.Y NavParams.FilterDescendantsInstances = getRayIgnoreList(nil) local waistOrigin = hrp.Position - Vector3.new(0, 0.5, 0) local aboveHeadOrigin = hrp.Position + Vector3.new(0, 2.4, 0) local waistHit = workspace:Raycast(waistOrigin, unitDir * 4.5, NavParams) if not waistHit then return desiredPos, false end -- If waist is blocked by a low brick wall / crate / step, but above head (+2.4 studs) is clear, JUMP over it! local headHit = workspace:Raycast(aboveHeadOrigin, unitDir * 4.5, NavParams) if not headHit and vertDiff >= -1.5 then return desiredPos, true end -- Full-height wall or pillar in front: use a committed avoidance direction (locked for 0.65s so it NEVER wiggles A+D!) local now = tick() local s = Bot.AvoidSign local angleOrder if now < Bot.AvoidLockUntil then angleOrder = { 45 * s, 80 * s, -45 * s, -80 * s, 115 * s, -115 * s } else angleOrder = { 45, -45, 80, -80, 115, -115 } end for _, deg in ipairs(angleOrder) do local rad = math.rad(deg) local cosA, sinA = math.cos(rad), math.sin(rad) local rotDir = Vector3.new( unitDir.X * cosA - unitDir.Z * sinA, 0, unitDir.X * sinA + unitDir.Z * cosA ) if not workspace:Raycast(waistOrigin, rotDir * 5.8, NavParams) then if now >= Bot.AvoidLockUntil then Bot.AvoidSign = (deg >= 0) and 1 or -1 Bot.AvoidLockUntil = now + 0.65 end return hrp.Position + rotDir * 8.5, false end end return desiredPos, (vertDiff >= -0.5) end local function computeMapPath(startPos, endPos, targetChar) local groundStart = projectToFloor(startPos, nil) local groundEnd = projectToFloor(endPos, targetChar) local path = PathfindingService:CreatePath({ AgentRadius = 1.4, AgentHeight = 4.6, AgentCanJump = true, AgentCanClimb = true, WaypointSpacing = 3.2, }) local ok = pcall(function() path:ComputeAsync(groundStart, groundEnd) end) if ok and (path.Status == Enum.PathStatus.Success or path.Status == Enum.PathStatus.ClosestNoPath) then local wps = path:GetWaypoints() if wps and #wps >= 2 then return wps end end return nil end local function getNextWaypointIndexAhead(wps, hrpPos) local bestIdx = 2 local bestDist = math.huge local limit = math.min(#wps, 6) for i = 2, limit do local d = (wps[i].Position - hrpPos).Magnitude if d < bestDist then bestDist = d bestIdx = i end end if bestDist < 3.2 and bestIdx < #wps then bestIdx = bestIdx + 1 end return bestIdx end local function getRandomMapSpawn() local map = workspace:FindFirstChild("Map") local spawns = map and map:FindFirstChild("Spawns") if spawns then local list = spawns:GetChildren() if #list > 0 then local part = list[math.random(1, #list)] if part:IsA("BasePart") then return part.Position + Vector3.new(0, 3, 0) end end end return nil end local function getNavigationLookPosition(cam, hrp, targetHrp, dt) local now = tick() local camPos = cam.CFrame.Position local holdTime = getgenv().HoldAngleTime or 1.25 if Bot.LastSeenPos and (now - Bot.LastSeenTick) < holdTime then return Bot.LastSeenPos end local rawGoalPos = nil if getgenv().CornerPreAim and Bot.Waypoints and Bot.WaypointIdx <= #Bot.Waypoints then local maxLookAhead = math.min(#Bot.Waypoints, Bot.WaypointIdx + 4) for i = Bot.WaypointIdx, maxLookAhead do local wpPos = Bot.Waypoints[i].Position + Vector3.new(0, 2.3, 0) if hasClearLineOfSight(camPos, wpPos, nil) then rawGoalPos = wpPos else break end end end if not rawGoalPos and Bot.Waypoints and Bot.Waypoints[Bot.WaypointIdx] then local wp = Bot.Waypoints[Bot.WaypointIdx] rawGoalPos = wp.Position + Vector3.new(0, 2.3, 0) elseif not rawGoalPos and Bot.MoveTargetPos then rawGoalPos = Vector3.new(Bot.MoveTargetPos.X, Bot.MoveTargetPos.Y + 2.2, Bot.MoveTargetPos.Z) end if rawGoalPos then if not Bot.SmoothedLookPos then Bot.SmoothedLookPos = rawGoalPos else Bot.SmoothedLookPos = Bot.SmoothedLookPos:Lerp(rawGoalPos, math.clamp(dt * 8.0, 0.05, 1.0)) end return Bot.SmoothedLookPos end return nil end -- ============================================================================ -- [HIGH-PRIORITY MOVEMENT, PEEKING & COMBAT LOOP] -- ============================================================================ RunService:BindToRenderStep("ArsenalBotController", Enum.RenderPriority.Last.Value, function(dt) dt = math.clamp(dt or 0.016, 0.001, 0.1) if not Bot.Running or not getgenv().BotEnabled then setFiringState(false, math.huge) Highlight.Enabled = false return end if not isLocalAlive() then setFiringState(false, math.huge) Highlight.Enabled = false return end local char, hrp, hum = getLocalChar() if not char or not hrp or not hum then return end local now = tick() local cam = workspace.CurrentCamera -- Periodically roll bone preference (70% Head, 30% Body) if now >= Bot.NextBoneRollTick then Bot.NextBoneRollTick = now + math.random(110, 180) / 100 Bot.PreferHead = (math.random() <= (getgenv().HeadChance or 0.70)) end local targetPlr, dist, visPart = findBestEnemy(Bot.PreferHead) Bot.CurrentTarget = targetPlr Bot.VisiblePart = visPart -- Update Target Highlight if getgenv().TargetHighlight and targetPlr and targetPlr.Character then Highlight.Adornee = targetPlr.Character Highlight.FillColor = visPart and Color3.fromRGB(0, 255, 100) or Color3.fromRGB(255, 50, 50) Highlight.Enabled = true else Highlight.Enabled = false end if visPart then if Bot.TrackedEnemy ~= targetPlr then Bot.TrackedEnemy = targetPlr Bot.TargetSeenSince = now Bot.PreferHead = (math.random() <= (getgenv().HeadChance or 0.70)) end Bot.LastSeenPos = visPart.Position Bot.LastSeenTick = now Bot.SmoothedLookPos = visPart.Position else if Bot.TrackedEnemy ~= nil and (now - Bot.LastSeenTick) > (getgenv().HoldAngleTime or 1.25) then Bot.TrackedEnemy = nil end end -- Combat, Humanized Aiming & Weapon Switching if targetPlr and targetPlr.Character then local targetHrp = targetPlr.Character:FindFirstChild("HumanoidRootPart") if visPart then Bot.IsAiming = true if getgenv().SmartKnifeSwap and isHoldingMelee() and canSwapToGun() then equipSlot("gun") end local aimPos = getHumanizedAimPosition(visPart, targetHrp) if getgenv().Aimbot and cam then stepCameraTowards( cam, aimPos, getgenv().AimSpeed or 22.0, getgenv().MaxTurnSpeed or 780, dt ) end local reacted = (now - Bot.TargetSeenSince) >= (getgenv().ReactionTime or 0.05) local onTarget = cam and isCrosshairOnTarget(cam, aimPos, targetPlr.Character, dist) if getgenv().AutoShoot and reacted and onTarget then setFiringState(true, dist) else setFiringState(false, dist) end -- If holding Golden Knife / Melee and rushing a visible enemy, jump / double-jump to close the gap! if isHoldingMelee() and dist > 10 and dist < 38 then doJump(hum, true) end else Bot.IsAiming = false setFiringState(false, dist) if getgenv().AutoReload and dist > (getgenv().ReloadDis or 45) and (now - Bot.LastSeenTick) > 1.2 then triggerReload() end if getgenv().SmartKnifeSwap and (now - Bot.LastSeenTick) > 1.8 then if dist > (getgenv().KnifeOutDis or 95) then equipSlot("melee") else equipSlot("gun") end end if getgenv().Aimbot and cam then local navLookPos = getNavigationLookPosition(cam, hrp, targetHrp, dt) if navLookPos and (navLookPos - cam.CFrame.Position).Magnitude > 2.5 then stepCameraTowards( cam, navLookPos, getgenv().WalkLookSpeed or 7.5, 320, dt ) end end end else Bot.IsAiming = false setFiringState(false, math.huge) if getgenv().Aimbot and cam then local navLookPos = getNavigationLookPosition(cam, hrp, nil, dt) if navLookPos and (navLookPos - cam.CFrame.Position).Magnitude > 2.5 then stepCameraTowards(cam, navLookPos, getgenv().WalkLookSpeed or 7.5, 280, dt) end end end -- Walk / Pathfinding Execution (Smooth, continuous movement without A+D glitch) if getgenv().AIWalk and not wkspc.Status.Preparation.Value and hum.WalkSpeed > 0 then local targetChar = targetPlr and targetPlr.Character local targetHrp = targetChar and targetChar:FindFirstChild("HumanoidRootPart") local rawMoveGoal = nil -- 1. Direct close-range chase ONLY if there is no wall/cage/cliff in between if targetHrp and (visPart ~= nil or dist < 16) and canWalkDirectlyTo(hrp.Position, targetHrp.Position, targetChar) then if isHoldingMelee() and getgenv().MeleeBackstab then rawMoveGoal = (targetHrp.CFrame * CFrame.new(0, 0, 3.2)).Position else rawMoveGoal = targetHrp.Position end elseif Bot.Waypoints and Bot.WaypointIdx <= #Bot.Waypoints then -- 2. Follow Pathfinding Waypoints local wp = Bot.Waypoints[Bot.WaypointIdx] local flatDist = Vector3.new(wp.Position.X - hrp.Position.X, 0, wp.Position.Z - hrp.Position.Z).Magnitude local vertDiff = wp.Position.Y - hrp.Position.Y if (wp.Action == Enum.PathWaypointAction.Jump and vertDiff > -0.5) or vertDiff > 2.6 then doJump(hum, true) end local reachedVert = (vertDiff < 0 and vertDiff > -28) or (math.abs(vertDiff) < 5.5) if flatDist < 3.8 and reachedVert then Bot.WaypointIdx = Bot.WaypointIdx + 1 if Bot.Waypoints[Bot.WaypointIdx] then rawMoveGoal = Bot.Waypoints[Bot.WaypointIdx].Position end else rawMoveGoal = wp.Position end elseif targetHrp then rawMoveGoal = targetHrp.Position end if rawMoveGoal then local steeredGoal, shouldJump = getObstacleAvoidedTarget(hrp, rawMoveGoal) Bot.MoveTargetPos = steeredGoal if shouldJump then doJump(hum, false) end local movetitude = char:FindFirstChild("Movetitude") if movetitude then movetitude.Value = 1 end hum:MoveTo(steeredGoal) end end end) -- ============================================================================ -- [BACKGROUND PATH COMPUTATION, AUTO-DEPLOY & PICKUPS LOOP] -- ============================================================================ task.spawn(function() while Bot.Running do task.wait(0.20) if not getgenv().BotEnabled then continue end -- 1. Auto-Deploy & Auto-Vote stepAutoDeployAndVote() if not isLocalAlive() then Bot.Waypoints = nil Bot.StuckTicks = 0 continue end local _, hrp, hum = getLocalChar() if not hrp or not hum then continue end -- 2. Auto Pickup Health & Ammo Drops if getgenv().AutoPickups and tick() - Bot.LastPickupTick > 0.3 then Bot.LastPickupTick = tick() local debris = workspace:FindFirstChild("Debris") if debris and firetouchinterest then local nrpbs = LocalPlayer:FindFirstChild("NRPBS") local needHP = nrpbs and nrpbs:FindFirstChild("Health") and nrpbs:FindFirstChild("MaxHealth") and (nrpbs.Health.Value < nrpbs.MaxHealth.Value) for _, item in ipairs(debris:GetChildren()) do if item:IsA("BasePart") and item.Parent then if (item.Name == "DeadHP" and needHP) or item.Name == "DeadAmmo" then pcall(function() firetouchinterest(hrp, item, 0) firetouchinterest(hrp, item, 1) end) end end end end end -- 3. Pathfinding & Smart Stuck Recovery if getgenv().AIWalk and not wkspc.Status.Preparation.Value and hum.WalkSpeed > 0 then local movedDist = Vector3.new(hrp.Position.X - Bot.LastPos.X, 0, hrp.Position.Z - Bot.LastPos.Z).Magnitude Bot.LastPos = hrp.Position if movedDist < 0.85 then Bot.StuckTicks = Bot.StuckTicks + 1 if Bot.StuckTicks == 2 or Bot.StuckTicks == 4 then doJump(hum, true) elseif Bot.StuckTicks >= 6 then Bot.StuckTicks = 0 Bot.AvoidSign = -Bot.AvoidSign Bot.AvoidLockUntil = tick() + 0.8 local roamPos = getRandomMapSpawn() if roamPos then local wps = computeMapPath(hrp.Position, roamPos, nil) if wps then Bot.Waypoints = wps Bot.WaypointIdx = getNextWaypointIndexAhead(wps, hrp.Position) Bot.LastPathCompute = tick() end end end else Bot.StuckTicks = 0 end local targetPlr = Bot.CurrentTarget local targetChar = targetPlr and targetPlr.Character local targetHrp = targetChar and targetChar:FindFirstChild("HumanoidRootPart") local destPos = targetHrp and targetHrp.Position or getRandomMapSpawn() if destPos then local recalDis = getgenv().RecalDis or 14 local needRecalc = false if not Bot.Waypoints or Bot.WaypointIdx > #Bot.Waypoints then needRecalc = true elseif Bot.LastPathTarget and (destPos - Bot.LastPathTarget).Magnitude > recalDis then needRecalc = true elseif tick() - Bot.LastPathCompute > 2.2 then needRecalc = true end if needRecalc then Bot.LastPathTarget = destPos Bot.LastPathCompute = tick() local wps = computeMapPath(hrp.Position, destPos, targetChar) if wps then Bot.Waypoints = wps Bot.WaypointIdx = getNextWaypointIndexAhead(wps, hrp.Position) else local fallbackSpawn = getRandomMapSpawn() if fallbackSpawn then local fbWps = computeMapPath(hrp.Position, fallbackSpawn, nil) if fbWps then Bot.Waypoints = fbWps Bot.WaypointIdx = getNextWaypointIndexAhead(fbWps, hrp.Position) end end end end end end end end) -- ============================================================================ -- [STOP / UNLOAD HANDLER] -- ============================================================================ function Bot:Stop() if not self.Running then return end self.Running = false pcall(function() RunService:UnbindFromRenderStep("ArsenalBotController") end) setFiringState(false, math.huge) for _, conn in ipairs(self.Connections) do pcall(function() conn:Disconnect() end) end table.clear(self.Connections) if Highlight then pcall(function() Highlight:Destroy() end) end end