-- Проверка среды выполнения local Players = game:GetService("Players") local RunService = game:GetService("RunService") local Workspace = game:GetService("Workspace") local Camera = Workspace.CurrentCamera local LocalPlayer = Players.LocalPlayer -- Конфигурация local Settings = { ESP_Enabled = false, BoxESP = true, NameESP = true, Aimbot_Enabled = false, FOV = 180, -- Радиус зоны наводки ShowFOV = true, WallCheck = true, Smoothness = 4 -- Плавность наводки (меньше = быстрее) } -- Создание UI (Графического интерфейса) local ScreenGui = Instance.new("ScreenGui") ScreenGui.Name = "SwatSimulatorMobileMenu" -- Безопасное родительское окно для мобильных экплойтов if syn and syn.protect_gui then syn.protect_gui(ScreenGui) ScreenGui.Parent = game.CoreGui elseif gethui then ScreenGui.Parent = gethui() else ScreenGui.Parent = game.CoreGui end ScreenGui.ResetOnSpawn = false -- Главная панель local MainFrame = Instance.new("Frame") MainFrame.Size = UDim2.new(0, 260, 0, 210) MainFrame.Position = UDim2.new(0.5, -130, 0.4, -100) MainFrame.BackgroundColor3 = Color3.fromRGB(25, 25, 25) MainFrame.BorderSizePixel = 0 MainFrame.Active = true MainFrame.Draggable = true MainFrame.Parent = ScreenGui local UICornerMain = Instance.new("UICorner") UICornerMain.CornerRadius = UDim.new(0, 10) UICornerMain.Parent = MainFrame -- Заголовок меню local Title = Instance.new("TextLabel") Title.Size = UDim2.new(1, 0, 0, 35) Title.BackgroundColor3 = Color3.fromRGB(40, 40, 40) Title.Text = "SWAT Mobile Menu" Title.TextColor3 = Color3.fromRGB(255, 255, 255) Title.TextSize = 14 Title.Font = Enum.Font.GothamBold Title.Parent = MainFrame local UICornerTitle = Instance.new("UICorner") UICornerTitle.CornerRadius = UDim.new(0, 10) UICornerTitle.Parent = Title -- Плавающая кнопка открытия/закрытия меню local ToggleButton = Instance.new("TextButton") ToggleButton.Size = UDim2.new(0, 45, 0, 45) ToggleButton.Position = UDim2.new(0, 15, 0.15, 0) ToggleButton.BackgroundColor3 = Color3.fromRGB(35, 35, 35) ToggleButton.Text = "UI" ToggleButton.TextColor3 = Color3.fromRGB(255, 255, 255) ToggleButton.TextSize = 15 ToggleButton.Font = Enum.Font.GothamBold ToggleButton.Parent = ScreenGui local UICornerToggleBtn = Instance.new("UICorner") UICornerToggleBtn.CornerRadius = UDim.new(1, 0) UICornerToggleBtn.Parent = ToggleButton ToggleButton.MouseButton1Click:Connect(function() MainFrame.Visible = not MainFrame.Visible end) -- Функция создания переключателей (Toggle) local function createToggle(name, defaultState, callback, posY) local btn = Instance.new("TextButton") btn.Size = UDim2.new(0, 220, 0, 35) btn.Position = UDim2.new(0, 20, 0, posY) btn.BackgroundColor3 = defaultState and Color3.fromRGB(0, 170, 80) or Color3.fromRGB(170, 40, 40) btn.Text = name .. ": " .. (defaultState and "ON" or "OFF") btn.TextColor3 = Color3.fromRGB(255, 255, 255) btn.TextSize = 13 btn.Font = Enum.Font.GothamBold btn.Parent = MainFrame local corner = Instance.new("UICorner") corner.CornerRadius = UDim.new(0, 6) corner.Parent = btn local state = defaultState btn.MouseButton1Click:Connect(function() state = not state btn.BackgroundColor3 = state and Color3.fromRGB(0, 170, 80) or Color3.fromRGB(170, 40, 40) btn.Text = name .. ": " .. (state and "ON" or "OFF") callback(state) end) end -- Создаем кнопки в интерфейсе createToggle("ESP (NPC)", Settings.ESP_Enabled, function(state) Settings.ESP_Enabled = state end, 45) createToggle("Aimbot (NPC)", Settings.Aimbot_Enabled, function(state) Settings.Aimbot_Enabled = state end, 90) createToggle("WallCheck", Settings.WallCheck, function(state) Settings.WallCheck = state end, 135) -- Создание круга FOV local FOVCircle = Drawing.new("Circle") FOVCircle.Visible = Settings.ShowFOV FOVCircle.Radius = Settings.FOV FOVCircle.Color = Color3.fromRGB(255, 255, 255) FOVCircle.Thickness = 1 FOVCircle.Filled = false FOVCircle.Transparency = 0.6 local ESPList = {} -- Поиск врагов (NPC) в Workspace local function getEnemies() local enemies = {} for _, v in ipairs(Workspace:GetDescendants()) do if v:IsA("Model") and v:FindFirstChild("Humanoid") and v:FindFirstChild("HumanoidRootPart") then if not Players:GetPlayerFromCharacter(v) then if v.Humanoid.Health > 0 then table.insert(enemies, v) end end end end return enemies end -- Создание ESP local function createESP(character) if ESPList[character] then return end local box = Drawing.new("Square") box.Visible = false box.Color = Color3.fromRGB(255, 50, 50) box.Thickness = 1 box.Filled = false local name = Drawing.new("Text") name.Visible = false name.Color = Color3.fromRGB(255, 255, 255) name.Size = 13 name.Center = true name.Outline = true ESPList[character] = {Box = box, Name = name} end local function removeESP(character) if ESPList[character] then ESPList[character].Box:Remove() ESPList[character].Name:Remove() ESPList[character] = nil end end -- Проверка стен (WallCheck) local function isVisible(targetPart, character) if not Settings.WallCheck then return true end local origin = Camera.CFrame.Position local direction = (targetPart.Position - origin).Unit local distance = (targetPart.Position - origin).Magnitude local raycastParams = RaycastParams.new() raycastParams.FilterType = Enum.RaycastFilterType.Blacklist local ignoreList = {LocalPlayer.Character} if character then table.insert(ignoreList, character) end raycastParams.FilterDescendantsInstances = ignoreList local result = Workspace:Raycast(origin, direction * distance, raycastParams) return result == nil end -- Поиск ближайшего врага для Aimbot (от центра экрана) local function getClosestEnemy() local closestEnemy = nil local shortestDistance = Settings.FOV local screenCenter = Vector2.new(Camera.ViewportSize.X / 2, Camera.ViewportSize.Y / 2) for _, enemy in ipairs(getEnemies()) do local rootPart = enemy:FindFirstChild("HumanoidRootPart") -- Целимся в голову, если её нет — в центр туловища local head = enemy:FindFirstChild("Head") or rootPart if rootPart and head then if isVisible(head, enemy) then local vector, onScreen = Camera:WorldToViewportPoint(head.Position) if onScreen then local screenDist = (Vector2.new(vector.X, vector.Y) - screenCenter).Magnitude if screenDist < shortestDistance then shortestDistance = screenDist closestEnemy = head end end end end end return closestEnemy end -- Главный цикл работы (Рендер + Аимбот) RunService.RenderStepped:Connect(function() local screenCenter = Vector2.new(Camera.ViewportSize.X / 2, Camera.ViewportSize.Y / 2) -- Управление видимостью FOV круга FOVCircle.Position = screenCenter FOVCircle.Visible = Settings.Aimbot_Enabled and Settings.ShowFOV -- Мобильный Aimbot через CFrame (работает стабильно на телефонах) if Settings.Aimbot_Enabled then local target = getClosestEnemy() if target then -- Плавный поворот камеры прямо на цель (голову NPC) local currentCFrame = Camera.CFrame local targetCFrame = CFrame.new(currentCFrame.Position, target.Position) Camera.CFrame = currentCFrame:Lerp(targetCFrame, 1 / Settings.Smoothness) end end -- Отрисовка ESP local enemies = getEnemies() for char, _ in pairs(ESPList) do local found = false for _, e in ipairs(enemies) do if e == char then found = true break end end if not found then removeESP(char) end end for _, enemy in ipairs(enemies) do createESP(enemy) local data = ESPList[enemy] local rootPart = enemy:FindFirstChild("HumanoidRootPart") if data and rootPart then local vector, onScreen = Camera:WorldToViewportPoint(rootPart.Position) if Settings.ESP_Enabled and onScreen then local head = enemy:FindFirstChild("Head") local topPosition = head and Camera:WorldToViewportPoint(head.Position + Vector3.new(0, 0.5, 0)) or vector local bottomPosition = Camera:WorldToViewportPoint(rootPart.Position - Vector3.new(0, 3, 0)) local boxHeight = math.abs(topPosition.Y - bottomPosition.Y) local boxWidth = boxHeight / 2 if Settings.BoxESP then data.Box.Size = Vector2.new(boxWidth, boxHeight) data.Box.Position = Vector2.new(vector.X - boxWidth / 2, topPosition.Y) data.Box.Visible = true else data.Box.Visible = false end if Settings.NameESP then data.Name.Text = "Enemy [" .. math.floor((Camera.CFrame.Position - rootPart.Position).Magnitude) .. "m]" data.Name.Position = Vector2.new(vector.X, topPosition.Y - 18) data.Name.Visible = true else data.Name.Visible = false end else data.Box.Visible = false data.Name.Visible = false end end end end)