--[[ WARNING: Heads up! This script has not been verified by ScriptBlox. Use at your own risk! FIXED: "Revenge Mode" now uses a more reliable method to detect your attacker. - The moment you take damage, it will lock onto the closest enemy. - This lock is persistent and will only switch if a new person damages you. Includes Smoothing, ESP (ignores dead players), Team Check, and Prediction. ]] -- // Services local Players = game:GetService("Players") local UIS = game:GetService("UserInputService") local RS = game:GetService("RunService") local LP = Players.LocalPlayer local Mouse = LP:GetMouse() -- // Aimbot Settings local AimbotEnabled = false local AimbotKey = Enum.KeyCode.E -- Key to toggle local TargetPart = "HumanoidRootPart" local PredictionAmount = 0.165 local ThreatAngle = 30 -- Angle in degrees to detect if an enemy is looking at you local Smoothing = 0.15 -- Smoothing factor (lower = faster, higher = smoother) -- // Revenge Mode Settings local lastAttacker = nil -- This will now hold the target persistently -- // ESP Settings local ESPEnabled = true -- // =================================================================== -- // FUNCTION DEFINITIONS -- // =================================================================== -- // Helper function to check if a player is a valid target local function isValidTarget(player) if player == LP or player.Team == LP.Team or not player.Character then return false end local humanoid = player.Character:FindFirstChildOfClass("Humanoid") local targetPart = player.Character:FindFirstChild(TargetPart) local rootPart = player.Character:FindFirstChild("HumanoidRootPart") return humanoid and targetPart and rootPart and humanoid.Health > 0 end -- // Function to find the absolute nearest enemy local function findNearestPlayer() local closestPlayer = nil local shortestDist = math.huge if not LP.Character or not LP.Character:FindFirstChild("HumanoidRootPart") then return nil end local myPos = LP.Character.HumanoidRootPart.Position for _, player in ipairs(Players:GetPlayers()) do if isValidTarget(player) then local targetPos = player.Character[TargetPart].Position local distance = (myPos - targetPos).Magnitude if distance < shortestDist then shortestDist = distance closestPlayer = player end end end return closestPlayer end -- // Function to find the closest enemy looking at you (Threat) local function findThreat() local closestThreat = nil local shortestDist = math.huge if not LP.Character or not LP.Character:FindFirstChild("HumanoidRootPart") then return nil end local myPos = LP.Character.HumanoidRootPart.Position for _, player in ipairs(Players:GetPlayers()) do if isValidTarget(player) then local enemyRoot = player.Character.HumanoidRootPart local enemyLookVector = enemyRoot.CFrame.LookVector local directionToMe = (myPos - enemyRoot.Position).unit if enemyLookVector:Dot(directionToMe) > math.cos(math.rad(ThreatAngle)) then local distance = (myPos - enemyRoot.Position).Magnitude if distance < shortestDist then shortestDist = distance closestThreat = player end end end end return closestThreat end -- // *** FIXED: Damage Detection for Revenge Mode *** local function onCharacterAdded(char) local humanoid = char:WaitForChild("Humanoid") local lastHealth = humanoid.Health humanoid.HealthChanged:Connect(function(health) if health < lastHealth and AimbotEnabled then -- *** THE FIX IS HERE *** -- Find the closest enemy at the moment of damage. This is a much more reliable way to find the attacker. local potentialAttacker = findNearestPlayer() if potentialAttacker then lastAttacker = potentialAttacker -- Optional: Remove this print line if you don't want console spam. print("[Aimbot] Damage taken! Revenge target set to:", potentialAttacker.Name) end end lastHealth = health end) end -- // Main targeting function with PERSISTENT priority system local function GetTarget() -- Priority 1: Persistent Revenge Mode -- Check if we have a revenge target and if they are still a valid enemy. if lastAttacker and isValidTarget(lastAttacker) then return lastAttacker end -- If the revenge target is no longer valid, clear them and proceed to other modes. if lastAttacker and not isValidTarget(lastAttacker) then lastAttacker = nil end -- Priority 2: Threat Mode local threat = findThreat() if threat then return threat end -- Priority 3: Nearest Mode local nearest = findNearestPlayer() return nearest end -- // =================================================================== -- // GUI & EVENT CONNECTIONS -- // =================================================================== -- // Create GUI local ScreenGui = Instance.new("ScreenGui", LP:WaitForChild("PlayerGui")) ScreenGui.Name = "AimbotGUI" ScreenGui.ResetOnSpawn = false local Frame = Instance.new("Frame", ScreenGui) Frame.Size = UDim2.new(0, 250, 0, 290) Frame.Position = UDim2.new(0, 100, 0, 100) Frame.BackgroundColor3 = Color3.fromRGB(30, 30, 30) Frame.BorderSizePixel = 0 Frame.Active = true Frame.Draggable = true local Title = Instance.new("TextLabel", Frame) Title.Size = UDim2.new(1, 0, 0, 30) Title.Text = "⚙️ Persistent Revenge Aimbot" Title.BackgroundColor3 = Color3.fromRGB(40, 40, 40) Title.TextColor3 = Color3.fromRGB(255, 255, 255) Title.Font = Enum.Font.GothamBold Title.TextSize = 16 local ToggleBtn = Instance.new("TextButton", Frame) ToggleBtn.Size = UDim2.new(1, -20, 0, 30) ToggleBtn.Position = UDim2.new(0, 10, 0, 40) ToggleBtn.Text = "Aimbot: OFF" ToggleBtn.BackgroundColor3 = Color3.fromRGB(60, 60, 60) ToggleBtn.TextColor3 = Color3.fromRGB(255, 255, 255) ToggleBtn.Font = Enum.Font.Gotham ToggleBtn.TextSize = 14 local ESPToggleBtn = Instance.new("TextButton", Frame) ESPToggleBtn.Size = UDim2.new(1, -20, 0, 30) ESPToggleBtn.Position = UDim2.new(0, 10, 0, 75) ESPToggleBtn.Text = "ESP: ON ✅" ESPToggleBtn.BackgroundColor3 = Color3.fromRGB(60, 60, 60) ESPToggleBtn.TextColor3 = Color3.fromRGB(255, 255, 255) ToggleBtn.Font = Enum.Font.Gotham ESPToggleBtn.TextSize = 14 -- Targeting Mode Status Label local StatusLabel = Instance.new("TextLabel", Frame) StatusLabel.Size = UDim2.new(1, -20, 0, 25) StatusLabel.Position = UDim2.new(0, 10, 0, 110) StatusLabel.Text = "Targeting Mode: None" StatusLabel.BackgroundColor3 = Color3.fromRGB(50, 50, 50) StatusLabel.TextColor3 = Color3.fromRGB(200, 200, 200) StatusLabel.Font = Enum.Font.Gotham StatusLabel.TextSize = 14 -- Prediction GUI Elements local PredictionLabel = Instance.new("TextLabel", Frame) PredictionLabel.Size = UDim2.new(0, 100, 0, 30) PredictionLabel.Position = UDim2.new(0, 10, 0, 140) PredictionLabel.Text = "Prediction:" PredictionLabel.BackgroundTransparency = 1 PredictionLabel.TextColor3 = Color3.fromRGB(255, 255, 255) PredictionLabel.Font = Enum.Font.Gotham PredictionLabel.TextSize = 14 PredictionLabel.TextXAlignment = Enum.TextXAlignment.Left local PredictionInput = Instance.new("TextBox", Frame) PredictionInput.Size = UDim2.new(0, 60, 0, 25) PredictionInput.Position = UDim2.new(0, 110, 0, 142) PredictionInput.Text = tostring(PredictionAmount) PredictionInput.BackgroundColor3 = Color3.fromRGB(50, 50, 50) PredictionInput.TextColor3 = Color3.fromRGB(255, 255, 255) PredictionLabel.Font = Enum.Font.Gotham PredictionInput.TextSize = 14 -- Threat Angle GUI Elements local ThreatLabel = Instance.new("TextLabel", Frame) ThreatLabel.Size = UDim2.new(0, 100, 0, 30) ThreatLabel.Position = UDim2.new(0, 10, 0, 170) ThreatLabel.Text = "Threat Angle:" ThreatLabel.BackgroundTransparency = 1 ThreatLabel.TextColor3 = Color3.fromRGB(255, 255, 255) PredictionLabel.Font = Enum.Font.Gotham ThreatLabel.TextSize = 14 ThreatLabel.TextXAlignment = Enum.TextXAlignment.Left local ThreatInput = Instance.new("TextBox", Frame) ThreatInput.Size = UDim2.new(0, 60, 0, 25) ThreatInput.Position = UDim2.new(0, 110, 0, 172) ThreatInput.Text = tostring(ThreatAngle) ThreatInput.BackgroundColor3 = Color3.fromRGB(50, 50, 50) ThreatInput.TextColor3 = Color3.fromRGB(255, 255, 255) PredictionLabel.Font = Enum.Font.Gotham ThreatInput.TextSize = 14 -- Smoothing GUI Elements local SmoothingLabel = Instance.new("TextLabel", Frame) SmoothingLabel.Size = UDim2.new(0, 100, 0, 30) SmoothingLabel.Position = UDim2.new(0, 10, 0, 200) SmoothingLabel.Text = "Smoothing:" SmoothingLabel.BackgroundTransparency = 1 SmoothingLabel.TextColor3 = Color3.fromRGB(255, 255, 255) PredictionLabel.Font = Enum.Font.Gotham SmoothingLabel.TextSize = 14 SmoothingLabel.TextXAlignment = Enum.TextXAlignment.Left local SmoothingInput = Instance.new("TextBox", Frame) SmoothingInput.Size = UDim2.new(0, 60, 0, 25) SmoothingInput.Position = UDim2.new(0, 110, 0, 202) SmoothingInput.Text = tostring(Smoothing) SmoothingInput.BackgroundColor3 = Color3.fromRGB(50, 50, 50) SmoothingInput.TextColor3 = Color3.fromRGB(255, 255, 255) PredictionLabel.Font = Enum.Font.Gotham SmoothingInput.TextSize = 14 local CloseBtn = Instance.new("TextButton", Frame) CloseBtn.Size = UDim2.new(0, 25, 0, 25) CloseBtn.Position = UDim2.new(1, -30, 0, 5) CloseBtn.Text = "X" CloseBtn.BackgroundColor3 = Color3.fromRGB(100, 0, 0) CloseBtn.TextColor3 = Color3.fromRGB(255, 255, 255) PredictionLabel.Font = Enum.Font.Gotham CloseBtn.TextSize = 14 -- // GUI Functionality ToggleBtn.MouseButton1Click:Connect(function() AimbotEnabled = not AimbotEnabled ToggleBtn.Text = AimbotEnabled and "Aimbot: ON ✅" or "Aimbot: OFF ❌" if not AimbotEnabled then lastAttacker = nil StatusLabel.Text = "Targeting Mode: None" StatusLabel.TextColor3 = Color3.fromRGB(200, 200, 200) end end) ESPToggleBtn.MouseButton1Click:Connect(function() ESPEnabled = not ESPEnabled ESPToggleBtn.Text = ESPEnabled and "ESP: ON ✅" or "ESP: OFF ❌" for _, player in ipairs(Players:GetPlayers()) do updatePlayerESP(player) end end) CloseBtn.MouseButton1Click:Connect(function() Frame.Visible = not Frame.Visible end) PredictionInput.FocusLost:Connect(function(enterPressed) local newAmount = tonumber(PredictionInput.Text) if newAmount and newAmount >= 0 then PredictionAmount = newAmount else PredictionInput.Text = tostring(PredictionAmount) end end) ThreatInput.FocusLost:Connect(function(enterPressed) local newAngle = tonumber(ThreatInput.Text) if newAngle and newAngle > 0 and newAngle <= 180 then ThreatAngle = newAngle else ThreatInput.Text = tostring(ThreatAngle) end end) SmoothingInput.FocusLost:Connect(function(enterPressed) local newSmoothing = tonumber(SmoothingInput.Text) if newSmoothing and newSmoothing > 0 and newSmoothing <= 1 then Smoothing = newSmoothing else SmoothingInput.Text = tostring(Smoothing) end end) -- // ESP Functions local function createHighlight(character) local highlight = Instance.new("Highlight") highlight.Name = "EnemyHighlight" highlight.FillColor = Color3.new(1, 0, 0) highlight.FillTransparency = 1 highlight.OutlineColor = Color3.new(1, 0, 0) highlight.OutlineTransparency = 0 highlight.Parent = character end local function removeHighlight(character) local highlight = character:FindFirstChild("EnemyHighlight") if highlight then highlight:Destroy() end end local function updatePlayerESP(player) if player.Character then if player ~= LP and player.Team ~= LP.Team then if ESPEnabled and not player.Character:FindFirstChild("EnemyHighlight") then createHighlight(player.Character) elseif not ESPEnabled then removeHighlight(player.Character) end else removeHighlight(player.Character) end end end -- // Connect Events LP.CharacterAdded:Connect(onCharacterAdded) if LP.Character then onCharacterAdded(LP.Character) end for _, player in ipairs(Players:GetPlayers()) do player.CharacterAdded:Connect(function(char) updatePlayerESP(player) end) player:GetPropertyChangedSignal("Team"):Connect(function() updatePlayerESP(player) end) updatePlayerESP(player) end Players.PlayerAdded:Connect(function(player) player.CharacterAdded:Connect(function(char) updatePlayerESP(player) end) player:GetPropertyChangedSignal("Team"):Connect(function() updatePlayerESP(player) end) end) -- // Aimbot Loop RS.RenderStepped:Connect(function() if AimbotEnabled then local target = GetTarget() if target and target.Character and target.Character:FindFirstChild(TargetPart) then -- Update GUI Status if lastAttacker == target then StatusLabel.Text = "Targeting Mode: REVENGE" StatusLabel.TextColor3 = Color3.fromRGB(255, 0, 0) -- Bright Red for revenge else -- This part is to distinguish between Threat and Nearest if needed local threat = findThreat() if threat == target then StatusLabel.Text = "Targeting Mode: Threat" StatusLabel.TextColor3 = Color3.fromRGB(255, 100, 100) -- Red for threat else StatusLabel.Text = "Targeting Mode: Nearest" StatusLabel.TextColor3 = Color3.fromRGB(100, 255, 100) -- Green for nearest end end -- Aiming Logic local targetPart = target.Character[TargetPart] local cam = workspace.CurrentCamera local predictedPosition = targetPart.Position + (targetPart.Velocity * PredictionAmount) local targetCFrame = CFrame.new(cam.CFrame.Position, predictedPosition) cam.CFrame = cam.CFrame:Lerp(targetCFrame, Smoothing) else StatusLabel.Text = "Targeting Mode: None" StatusLabel.TextColor3 = Color3.fromRGB(200, 200, 200) end end end)