if not game:GetService("RunService"):IsClient() then return end local Players = game:GetService("Players") local RunService = game:GetService("RunService") local UserInputService = game:GetService("UserInputService") local Camera = workspace.CurrentCamera local LocalPlayer = Players.LocalPlayer -- SETTINGS local Settings = { Enabled = false, Mode = "Aimlock", TargetMode = "NPC", BulletSpeed = 300, PredictionStrength = 1, GravityEnabled = false, GravityStrength = 196.2, AimRadius = 150, ShowRadius = true, WallCheck = true, WallCheckStrength = "High", AimbotSmoothing = 0.3, AntiLag = true, } -- UI local Gui = Instance.new("ScreenGui", game.CoreGui) Gui.Name = "AimSystemGui" Gui.ResetOnSpawn = false local function createDraggableButton(name, size, position, text) local frame = Instance.new("Frame", Gui) frame.Name = name frame.Size = size frame.Position = position frame.BackgroundColor3 = Color3.fromRGB(25,25,25) frame.BorderSizePixel = 0 frame.Active = true local corner = Instance.new("UICorner", frame) corner.CornerRadius = UDim.new(0,12) local label = Instance.new("TextLabel", frame) label.Size = UDim2.new(1,0,1,0) label.BackgroundTransparency = 1 label.Text = text label.TextColor3 = Color3.new(1,1,1) label.TextScaled = true label.Font = Enum.Font.GothamBold local dragging = false local dragInput local dragStart local startPos local moved = false frame.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.Touch or input.UserInputType == Enum.UserInputType.MouseButton1 then dragging = true dragInput = input dragStart = input.Position startPos = frame.Position moved = false end end) frame.InputChanged:Connect(function(input) if input == dragInput and dragging then local delta = input.Position - dragStart if math.abs(delta.X) > 5 or math.abs(delta.Y) > 5 then moved = true end frame.Position = UDim2.new( startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y ) end end) frame.InputEnded:Connect(function(input) if input == dragInput then dragging = false if not moved then frame:FindFirstChild("ClickEvent"):Fire() end end end) local clickEvent = Instance.new("BindableEvent") clickEvent.Name = "ClickEvent" clickEvent.Parent = frame return frame, label, clickEvent end local MainFrame, MainLabel, MainClick = createDraggableButton("MainButton", UDim2.new(0,120,0,45), UDim2.new(0.05,0,0.5,0), "AIM: OFF") local SettingsFrame, SettingsLabel, SettingsClick = createDraggableButton("SettingsButton", UDim2.new(0,120,0,45), UDim2.new(0.05,0,0.6,0), "SETTINGS") local SettingsPanel = Instance.new("Frame", Gui) SettingsPanel.Size = UDim2.new(0,300,0,530) SettingsPanel.Position = UDim2.new(0.65,0,0.2,0) SettingsPanel.BackgroundColor3 = Color3.fromRGB(20,20,20) SettingsPanel.Visible = false SettingsPanel.BorderSizePixel = 0 SettingsPanel.Active = true local corner2 = Instance.new("UICorner", SettingsPanel) corner2.CornerRadius = UDim.new(0,14) do local dragging = false local dragInput local dragStart local startPos SettingsPanel.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.Touch or input.UserInputType == Enum.UserInputType.MouseButton1 then dragging = true dragInput = input dragStart = input.Position startPos = SettingsPanel.Position end end) SettingsPanel.InputChanged:Connect(function(input) if input == dragInput and dragging then local delta = input.Position - dragStart SettingsPanel.Position = UDim2.new( startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y ) end end) SettingsPanel.InputEnded:Connect(function(input) if input == dragInput then dragging = false end end) end local function createSlider(text, yPos, min, max, default, callback, formatValue) local label = Instance.new("TextLabel", SettingsPanel) label.Size = UDim2.new(1, -20, 0, 30) label.Position = UDim2.new(0,10,0,yPos) label.BackgroundTransparency = 1 label.Text = text .. ": " .. (formatValue and formatValue(default) or default) label.TextColor3 = Color3.new(1,1,1) label.TextScaled = true label.Font = Enum.Font.Gotham local bar = Instance.new("Frame", SettingsPanel) bar.Size = UDim2.new(1, -40, 0, 12) bar.Position = UDim2.new(0,20,0,yPos+35) bar.BackgroundColor3 = Color3.fromRGB(60,60,60) bar.BorderSizePixel = 0 bar.Active = true local fill = Instance.new("Frame", bar) fill.Size = UDim2.new((default-min)/(max-min), 0, 1, 0) fill.BackgroundColor3 = Color3.fromRGB(0,170,255) fill.BorderSizePixel = 0 local dragging = false bar.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.Touch or input.UserInputType == Enum.UserInputType.MouseButton1 then dragging = true end end) bar.InputChanged:Connect(function(input) if dragging then local x = math.clamp((input.Position.X - bar.AbsolutePosition.X) / bar.AbsoluteSize.X, 0, 1) fill.Size = UDim2.new(x, 0, 1, 0) local value = min + (max - min) * x label.Text = text .. ": " .. (formatValue and formatValue(value) or math.floor(value)) callback(value) end end) bar.InputEnded:Connect(function(input) if input.UserInputType == Enum.UserInputType.Touch or input.UserInputType == Enum.UserInputType.MouseButton1 then dragging = false end end) end local function createToggle(text, yPos, default, callback) local label = Instance.new("TextLabel", SettingsPanel) label.Size = UDim2.new(0.6, -10, 0, 35) label.Position = UDim2.new(0,10,0,yPos) label.BackgroundTransparency = 1 label.Text = text label.TextColor3 = Color3.new(1,1,1) label.TextScaled = true label.Font = Enum.Font.Gotham label.TextXAlignment = Enum.TextXAlignment.Left local toggleBtn = Instance.new("TextButton", SettingsPanel) toggleBtn.Size = UDim2.new(0.25, 0, 0, 35) toggleBtn.Position = UDim2.new(0.72, 0, 0, yPos) toggleBtn.BackgroundColor3 = default and Color3.fromRGB(0,170,255) or Color3.fromRGB(60,60,60) toggleBtn.Text = default and "ON" or "OFF" toggleBtn.TextColor3 = Color3.new(1,1,1) toggleBtn.TextScaled = true toggleBtn.Font = Enum.Font.Gotham local corner = Instance.new("UICorner", toggleBtn) corner.CornerRadius = UDim.new(0,8) local state = default toggleBtn.MouseButton1Click:Connect(function() state = not state toggleBtn.BackgroundColor3 = state and Color3.fromRGB(0,170,255) or Color3.fromRGB(60,60,60) toggleBtn.Text = state and "ON" or "OFF" callback(state) end) return toggleBtn end local function createModeButton(text, yPos, options, default, callback) local label = Instance.new("TextLabel", SettingsPanel) label.Size = UDim2.new(0.5, -10, 0, 35) label.Position = UDim2.new(0,10,0,yPos) label.BackgroundTransparency = 1 label.Text = text label.TextColor3 = Color3.new(1,1,1) label.TextScaled = true label.Font = Enum.Font.Gotham label.TextXAlignment = Enum.TextXAlignment.Left local btn = Instance.new("TextButton", SettingsPanel) btn.Size = UDim2.new(0.4, 0, 0, 35) btn.Position = UDim2.new(0.55, 0, 0, yPos) btn.BackgroundColor3 = Color3.fromRGB(60,60,60) btn.Text = default btn.TextColor3 = Color3.new(1,1,1) btn.TextScaled = true btn.Font = Enum.Font.Gotham local corner = Instance.new("UICorner", btn) corner.CornerRadius = UDim.new(0,8) local currentIndex = 1 for i, opt in ipairs(options) do if opt == default then currentIndex = i break end end btn.MouseButton1Click:Connect(function() currentIndex = currentIndex % #options + 1 local newValue = options[currentIndex] btn.Text = newValue callback(newValue) end) return btn end local function createRadiusTextBox(text, yPos, minValue, maxValue, defaultValue, callback) local label = Instance.new("TextLabel", SettingsPanel) label.Size = UDim2.new(0.5, -15, 0, 35) label.Position = UDim2.new(0,10,0,yPos) label.BackgroundTransparency = 1 label.Text = text .. ":" label.TextColor3 = Color3.new(1,1,1) label.TextScaled = true label.Font = Enum.Font.Gotham label.TextXAlignment = Enum.TextXAlignment.Left local textBox = Instance.new("TextBox", SettingsPanel) textBox.Size = UDim2.new(0.4, 0, 0, 35) textBox.Position = UDim2.new(0.55, 0, 0, yPos) textBox.BackgroundColor3 = Color3.fromRGB(45,45,45) textBox.TextColor3 = Color3.new(1,1,1) textBox.Text = tostring(defaultValue) textBox.TextScaled = true textBox.Font = Enum.Font.Gotham textBox.ClearTextOnFocus = false textBox.PlaceholderText = tostring(minValue) .. "-" .. tostring(maxValue) local corner = Instance.new("UICorner", textBox) corner.CornerRadius = UDim.new(0, 8) textBox.FocusLost:Connect(function(enterPressed) local num = tonumber(textBox.Text) if num then num = math.clamp(num, minValue, maxValue) Settings.AimRadius = num textBox.Text = tostring(num) callback(num) else textBox.Text = tostring(Settings.AimRadius) end end) return textBox end -- TẠO CÁC THÀNH PHẦN TRONG PANEL SETTINGS local yOffset = 10 createModeButton("Mode", yOffset, {"Aimlock", "Aimbot"}, "Aimlock", function(v) Settings.Mode = v end) yOffset = yOffset + 45 createModeButton("Target Mode", yOffset, {"NPC", "Player", "All"}, "NPC", function(v) Settings.TargetMode = v end) yOffset = yOffset + 45 createToggle("Gravity", yOffset, false, function(v) Settings.GravityEnabled = v end) yOffset = yOffset + 45 createToggle("Anti Lag (Optimize)", yOffset, true, function(v) Settings.AntiLag = v end) yOffset = yOffset + 50 createSlider("Bullet Speed", yOffset, 50, 2000, Settings.BulletSpeed, function(v) Settings.BulletSpeed = v end) yOffset = yOffset + 55 createSlider("Gravity Strength", yOffset, 0, 500, Settings.GravityStrength, function(v) Settings.GravityStrength = v end, function(v) return math.floor(v) .. " (g)" end) yOffset = yOffset + 55 createRadiusTextBox("Aim Radius", yOffset, 10, 500, Settings.AimRadius, function(v) Settings.AimRadius = v end) yOffset = yOffset + 50 createSlider("Prediction Strength", yOffset, 0, 200, Settings.PredictionStrength * 100, function(v) Settings.PredictionStrength = v / 100 end) yOffset = yOffset + 55 createSlider("Aimbot Smoothing", yOffset, 0, 100, Settings.AimbotSmoothing * 100, function(v) Settings.AimbotSmoothing = v / 100 end, function(v) local speedText = v == 0 and "SNAP" or (v < 30 and "RẤT NHANH" or (v < 60 and "NHANH" or (v < 85 and "TRUNG BÌNH" or "CHẬM"))) return math.floor(v) .. "% (" .. speedText .. ")" end) yOffset = yOffset + 55 local wallCheckLabel = Instance.new("TextLabel", SettingsPanel) wallCheckLabel.Size = UDim2.new(1, -20, 0, 30) wallCheckLabel.Position = UDim2.new(0,10,0,yOffset) wallCheckLabel.BackgroundTransparency = 1 wallCheckLabel.Text = "WALL CHECK: HIGH" wallCheckLabel.TextColor3 = Color3.new(1,1,1) wallCheckLabel.TextScaled = true wallCheckLabel.Font = Enum.Font.Gotham yOffset = yOffset + 35 local wallCheckButton = Instance.new("TextButton", SettingsPanel) wallCheckButton.Size = UDim2.new(0.8, 0, 0, 40) wallCheckButton.Position = UDim2.new(0.1, 0, 0, yOffset) wallCheckButton.BackgroundColor3 = Color3.fromRGB(60,60,60) wallCheckButton.Text = "Toggle WallCheck Mode" wallCheckButton.TextColor3 = Color3.new(1,1,1) wallCheckButton.TextScaled = true wallCheckButton.Font = Enum.Font.Gotham wallCheckButton.MouseButton1Click:Connect(function() if Settings.WallCheckStrength == "Normal" then Settings.WallCheckStrength = "High" wallCheckLabel.Text = "WALL CHECK: HIGH" else Settings.WallCheckStrength = "Normal" wallCheckLabel.Text = "WALL CHECK: NORMAL" end end) local RadiusCircle = Drawing.new("Circle") RadiusCircle.Visible = Settings.ShowRadius RadiusCircle.Filled = false RadiusCircle.Thickness = 2 RadiusCircle.Transparency = 1 RadiusCircle.Color = Color3.fromRGB(0,170,255) RadiusCircle.NumSides = 100 MainClick.Event:Connect(function() Settings.Enabled = not Settings.Enabled MainLabel.Text = Settings.Enabled and "AIM: ON" or "AIM: OFF" end) SettingsClick.Event:Connect(function() SettingsPanel.Visible = not SettingsPanel.Visible end) local function isNPC(model) return model:IsA("Model") and model:FindFirstChildOfClass("Humanoid") and not Players:GetPlayerFromCharacter(model) end local function isPlayer(model) return Players:GetPlayerFromCharacter(model) ~= nil end local function isValidTarget(character) if not character then return false end local humanoid = character:FindFirstChildOfClass("Humanoid") if not humanoid or humanoid.Health <= 0 then return false end if not character:FindFirstChild("HumanoidRootPart") and not character:FindFirstChild("Torso") and not character:FindFirstChild("Head") then return false end return true end local function isInRadius(part) local centerPos = Vector2.new(Camera.ViewportSize.X / 2, Camera.ViewportSize.Y / 2) local screenPos, onScreen = Camera:WorldToViewportPoint(part.Position) if onScreen then local dist = (Vector2.new(screenPos.X, screenPos.Y) - centerPos).Magnitude return dist <= Settings.AimRadius end return false end local function getValidTargetsInRadius() local targets = {} for _, model in ipairs(workspace:GetDescendants()) do if model:IsA("Model") and isValidTarget(model) then local hasPartInRadius = false local aimParts = {} if model:FindFirstChild("Head") then table.insert(aimParts, model.Head) end if model:FindFirstChild("HumanoidRootPart") then table.insert(aimParts, model.HumanoidRootPart) end if model:FindFirstChild("Torso") then table.insert(aimParts, model.Torso) end if model:FindFirstChild("UpperTorso") then table.insert(aimParts, model.UpperTorso) end if model:FindFirstChild("LowerTorso") then table.insert(aimParts, model.LowerTorso) end for _, part in ipairs(aimParts) do if isInRadius(part) then hasPartInRadius = true break end end if hasPartInRadius then if Settings.TargetMode == "NPC" and isNPC(model) then table.insert(targets, model) elseif Settings.TargetMode == "Player" and isPlayer(model) and model ~= LocalPlayer.Character then table.insert(targets, model) elseif Settings.TargetMode == "All" and (isNPC(model) or (isPlayer(model) and model ~= LocalPlayer.Character)) then table.insert(targets, model) end end end end return targets end local function getValidTargetsAll() local targets = {} for _, model in ipairs(workspace:GetDescendants()) do if model:IsA("Model") and isValidTarget(model) then if Settings.TargetMode == "NPC" and isNPC(model) then table.insert(targets, model) elseif Settings.TargetMode == "Player" and isPlayer(model) and model ~= LocalPlayer.Character then table.insert(targets, model) elseif Settings.TargetMode == "All" and (isNPC(model) or (isPlayer(model) and model ~= LocalPlayer.Character)) then table.insert(targets, model) end end end return targets end local function getAimParts(character) local parts = {} if character:FindFirstChild("Head") then table.insert(parts, character.Head) end if character:FindFirstChild("HumanoidRootPart") then table.insert(parts, character.HumanoidRootPart) end if character:FindFirstChild("Torso") then table.insert(parts, character.Torso) end if character:FindFirstChild("UpperTorso") then table.insert(parts, character.UpperTorso) end if character:FindFirstChild("LowerTorso") then table.insert(parts, character.LowerTorso) end return parts end local function enhancedWallCheck(origin, targetPart) if not Settings.WallCheck then return true end local targetPos = targetPart.Position local direction = (targetPos - origin).Unit local distance = (targetPos - origin).Magnitude local params = RaycastParams.new() params.FilterDescendantsInstances = {LocalPlayer.Character} params.FilterType = Enum.RaycastFilterType.Blacklist if Settings.WallCheckStrength == "High" then local checkPoints = { targetPos, targetPos + Vector3.new(0.5, 0.5, 0), targetPos + Vector3.new(-0.5, 0.5, 0), targetPos + Vector3.new(0.5, -0.5, 0), targetPos + Vector3.new(-0.5, -0.5, 0), } local hitCount = 0 for _, point in ipairs(checkPoints) do local result = workspace:Raycast(origin, (point - origin), params) if result and result.Instance and not result.Instance:IsDescendantOf(targetPart.Parent) then hitCount = hitCount + 1 end end return hitCount <= 2 else local offsetDirection = direction + Vector3.new(0, 0.3, 0) local result = workspace:Raycast(origin, offsetDirection * distance, params) if result and result.Instance and not result.Instance:IsDescendantOf(targetPart.Parent) then return false end return true end end local function predictPosition(part) local velocity = part.AssemblyLinearVelocity local distance = (Camera.CFrame.Position - part.Position).Magnitude local travelTime = distance / Settings.BulletSpeed local predictedPos = part.Position + (velocity * travelTime * Settings.PredictionStrength) if Settings.GravityEnabled then local drop = 0.5 * Settings.GravityStrength * (travelTime * travelTime) predictedPos = Vector3.new(predictedPos.X, predictedPos.Y + drop, predictedPos.Z) end return predictedPos end local currentTarget = nil local targetLockFrames = 0 local function getClosestToCenterTarget() local centerPos = Vector2.new(Camera.ViewportSize.X / 2, Camera.ViewportSize.Y / 2) local closestPart = nil local closestDist = Settings.AimRadius if currentTarget and isValidTarget(currentTarget.Parent) then local screenPos, onScreen = Camera:WorldToViewportPoint(currentTarget.Position) if onScreen then local dist = (Vector2.new(screenPos.X, screenPos.Y) - centerPos).Magnitude if dist < Settings.AimRadius and enhancedWallCheck(Camera.CFrame.Position, currentTarget) then closestPart = currentTarget closestDist = dist targetLockFrames = targetLockFrames + 1 else targetLockFrames = 0 end else targetLockFrames = 0 end end if not closestPart or targetLockFrames > 30 then targetLockFrames = 0 local targets if Settings.AntiLag then targets = getValidTargetsInRadius() else targets = getValidTargetsAll() end for _, character in ipairs(targets) do for _, part in ipairs(getAimParts(character)) do local screenPos, onScreen = Camera:WorldToViewportPoint(part.Position) if onScreen then local dist = (Vector2.new(screenPos.X, screenPos.Y) - centerPos).Magnitude if dist < closestDist and enhancedWallCheck(Camera.CFrame.Position, part) then closestDist = dist closestPart = part end end end end end currentTarget = closestPart return closestPart end local function aimAt(position) if Settings.Mode == "Aimlock" then Camera.CFrame = CFrame.new(Camera.CFrame.Position, position) else local smoothFactor = 1 - Settings.AimbotSmoothing if smoothFactor <= 0.01 then Camera.CFrame = CFrame.new(Camera.CFrame.Position, position) else Camera.CFrame = Camera.CFrame:Lerp(CFrame.new(Camera.CFrame.Position, position), smoothFactor) end end end RunService.RenderStepped:Connect(function() RadiusCircle.Visible = Settings.ShowRadius RadiusCircle.Radius = Settings.AimRadius RadiusCircle.Position = UserInputService:GetMouseLocation() if not Settings.Enabled then currentTarget = nil return end local targetPart = getClosestToCenterTarget() if targetPart then local character = targetPart.Parent if isValidTarget(character) then if enhancedWallCheck(Camera.CFrame.Position, targetPart) then local aimPos = predictPosition(targetPart) aimAt(aimPos) end else currentTarget = nil end else currentTarget = nil end end)