--[[ Mobile Aimbot + ESP v4 Written by me with AI assistance Mobile compatible with toggle buttons --]] local Players = game:GetService("Players") local RunService = game:GetService("RunService") local UserInputService = game:GetService("UserInputService") local Workspace = game:GetService("Workspace") local CoreGui = game:GetService("CoreGui") local TweenService = game:GetService("TweenService") local LocalPlayer = Players.LocalPlayer local Camera = Workspace.CurrentCamera -- Configuration local ESP_ENABLED = true local AIMBOT_ENABLED = false local AIM_KEY = Enum.KeyCode.RightControl local SMOOTHNESS = 2.5 local MAX_DISTANCE = 500 local TEAM_CHECK = true -- Mobile GUI local ScreenGui = Instance.new("ScreenGui") local AimbotButton = Instance.new("TextButton") local ESPButton = Instance.new("TextButton") ScreenGui.Name = "MobileControls" ScreenGui.Parent = CoreGui -- Aimbot Button AimbotButton.Name = "AimbotButton" AimbotButton.Size = UDim2.new(0, 120, 0, 50) AimbotButton.Position = UDim2.new(0, 20, 0.5, -60) AimbotButton.BackgroundColor3 = Color3.fromRGB(255, 0, 0) AimbotButton.Text = "Aimbot: OFF" AimbotButton.TextColor3 = Color3.fromRGB(255, 255, 255) AimbotButton.TextSize = 14 AimbotButton.Font = Enum.Font.GothamBold AimbotButton.Parent = ScreenGui -- ESP Button ESPButton.Name = "ESPButton" ESPButton.Size = UDim2.new(0, 120, 0, 50) ESPButton.Position = UDim2.new(0, 20, 0.5, 20) ESPButton.BackgroundColor3 = Color3.fromRGB(0, 255, 0) ESPButton.Text = "ESP: ON" ESPButton.TextColor3 = Color3.fromRGB(255, 255, 255) ESPButton.TextSize = 14 ESPButton.Font = Enum.Font.GothamBold ESPButton.Parent = ScreenGui -- Button click functions AimbotButton.MouseButton1Click:Connect(function() AIMBOT_ENABLED = not AIMBOT_ENABLED if AIMBOT_ENABLED then AimbotButton.BackgroundColor3 = Color3.fromRGB(0, 255, 0) AimbotButton.Text = "Aimbot: ON" else AimbotButton.BackgroundColor3 = Color3.fromRGB(255, 0, 0) AimbotButton.Text = "Aimbot: OFF" end end) ESPButton.MouseButton1Click:Connect(function() ESP_ENABLED = not ESP_ENABLED if ESP_ENABLED then ESPButton.BackgroundColor3 = Color3.fromRGB(0, 255, 0) ESPButton.Text = "ESP: ON" else ESPButton.BackgroundColor3 = Color3.fromRGB(255, 0, 0) ESPButton.Text = "ESP: OFF" end end) -- Make buttons draggable local function makeDraggable(button) local dragging = false local dragInput local dragStart local startPos local function update(input) local delta = input.Position - dragStart button.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y) end button.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then dragging = true dragStart = input.Position startPos = button.Position input.Changed:Connect(function() if input.UserInputState == Enum.UserInputState.End then dragging = false end end) end end) button.InputChanged:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then dragInput = input end end) UserInputService.InputChanged:Connect(function(input) if input == dragInput and dragging then update(input) end end) end makeDraggable(AimbotButton) makeDraggable(ESPButton) -- ESP Variables local ESPFolder = Instance.new("Folder") ESPFolder.Name = "UniversalESP" ESPFolder.Parent = CoreGui local function CreateESP(player) if player == LocalPlayer then return end local Box = Drawing.new("Square") local Tracer = Drawing.new("Line") local NameLabel = Drawing.new("Text") local DistanceLabel = Drawing.new("Text") local HealthBar = Drawing.new("Square") local HealthBarBackground = Drawing.new("Square") Box.Visible = false Box.Color = Color3.new(1, 0, 0) Box.Thickness = 2 Box.Filled = false Tracer.Visible = false Tracer.Color = Color3.new(1, 1, 0) Tracer.Thickness = 2 NameLabel.Visible = false NameLabel.Color = Color3.new(1, 1, 1) NameLabel.Size = 16 NameLabel.Center = true NameLabel.Outline = true DistanceLabel.Visible = false DistanceLabel.Color = Color3.new(0.7, 0.7, 1) DistanceLabel.Size = 14 DistanceLabel.Center = true DistanceLabel.Outline = true HealthBarBackground.Visible = false HealthBarBackground.Color = Color3.new(0, 0, 0) HealthBarBackground.Filled = true HealthBarBackground.Thickness = 1 HealthBar.Visible = false HealthBar.Color = Color3.new(0, 1, 0) HealthBar.Filled = true HealthBar.Thickness = 1 local connection connection = RunService.RenderStepped:Connect(function() if not player or not player.Character or not player.Character:FindFirstChild("Humanoid") or not player.Character:FindFirstChild("HumanoidRootPart") then Box.Visible = false Tracer.Visible = false NameLabel.Visible = false DistanceLabel.Visible = false HealthBar.Visible = false HealthBarBackground.Visible = false return end local character = player.Character local humanoid = character.Humanoid local rootPart = character.HumanoidRootPart if TEAM_CHECK and player.Team == LocalPlayer.Team then Box.Visible = false Tracer.Visible = false NameLabel.Visible = false DistanceLabel.Visible = false HealthBar.Visible = false HealthBarBackground.Visible = false return end local position, onScreen = Camera:WorldToViewportPoint(rootPart.Position) local distance = (LocalPlayer.Character.HumanoidRootPart.Position - rootPart.Position).Magnitude if onScreen and distance <= MAX_DISTANCE then local scale = 1 / (position.Z * math.tan(math.rad(Camera.FieldOfView * 0.5)) * 2) * 100 local width, height = math.floor(40 * scale), math.floor(50 * scale) local x, y = math.floor(position.X), math.floor(position.Y) Box.Size = Vector2.new(width, height) Box.Position = Vector2.new(x - width/2, y - height/2) Box.Visible = ESP_ENABLED Tracer.From = Vector2.new(Camera.ViewportSize.X/2, Camera.ViewportSize.Y) Tracer.To = Vector2.new(x, y + height/2) Tracer.Visible = ESP_ENABLED NameLabel.Text = player.Name NameLabel.Position = Vector2.new(x, y - height/2 - 20) NameLabel.Visible = ESP_ENABLED DistanceLabel.Text = math.floor(distance) .. " studs" DistanceLabel.Position = Vector2.new(x, y + height/2 + 5) DistanceLabel.Visible = ESP_ENABLED local health = humanoid.Health / humanoid.MaxHealth local barHeight = height local barWidth = 4 local barX = x - width/2 - 8 local barY = y - height/2 HealthBarBackground.Size = Vector2.new(barWidth, barHeight) HealthBarBackground.Position = Vector2.new(barX, barY) HealthBarBackground.Visible = ESP_ENABLED HealthBar.Size = Vector2.new(barWidth, barHeight * health) HealthBar.Position = Vector2.new(barX, barY + (barHeight * (1 - health))) HealthBar.Visible = ESP_ENABLED if health > 0.7 then HealthBar.Color = Color3.new(0, 1, 0) elseif health > 0.3 then HealthBar.Color = Color3.new(1, 1, 0) else HealthBar.Color = Color3.new(1, 0, 0) end else Box.Visible = false Tracer.Visible = false NameLabel.Visible = false DistanceLabel.Visible = false HealthBar.Visible = false HealthBarBackground.Visible = false end end) player:GetPropertyChangedSignal("Parent"):Connect(function() if not player or player.Parent ~= Players then connection:Disconnect() Box:Remove() Tracer:Remove() NameLabel:Remove() DistanceLabel:Remove() HealthBar:Remove() HealthBarBackground:Remove() end end) end local function FindClosestPlayer() local closestPlayer = nil local closestDistance = MAX_DISTANCE for _, player in pairs(Players:GetPlayers()) do if player ~= LocalPlayer and player.Character and player.Character:FindFirstChild("Humanoid") and player.Character:FindFirstChild("HumanoidRootPart") then if TEAM_CHECK and player.Team == LocalPlayer.Team then continue end local distance = (LocalPlayer.Character.HumanoidRootPart.Position - player.Character.HumanoidRootPart.Position).Magnitude if distance < closestDistance then closestDistance = distance closestPlayer = player end end end return closestPlayer end -- Aimbot loop (works for both mobile and PC) RunService.RenderStepped:Connect(function() if not LocalPlayer.Character or not LocalPlayer.Character:FindFirstChild("HumanoidRootPart") then return end -- For PC: Hold Right Control, For Mobile: Aimbot toggle button if AIMBOT_ENABLED or UserInputService:IsKeyDown(AIM_KEY) then local target = FindClosestPlayer() if target and target.Character and target.Character:FindFirstChild("HumanoidRootPart") then local targetPosition = target.Character.HumanoidRootPart.Position local cameraPosition = Camera.CFrame.Position local direction = (targetPosition - cameraPosition).Unit local currentLook = Camera.CFrame.LookVector local smoothDirection = currentLook:Lerp(direction, 1/SMOOTHNESS) Camera.CFrame = CFrame.new(cameraPosition, cameraPosition + smoothDirection) end end end) -- ESP for all players for _, player in pairs(Players:GetPlayers()) do if player ~= LocalPlayer then CreateESP(player) end end Players.PlayerAdded:Connect(function(player) CreateESP(player) end) -- PC Controls UserInputService.InputBegan:Connect(function(input) if input.KeyCode == Enum.KeyCode.F9 then ESP_ENABLED = not ESP_ENABLED ESPButton.BackgroundColor3 = ESP_ENABLED and Color3.fromRGB(0, 255, 0) or Color3.fromRGB(255, 0, 0) ESPButton.Text = ESP_ENABLED and "ESP: ON" or "ESP: OFF" end end) -- Cleanup LocalPlayer:GetPropertyChangedSignal("Parent"):Connect(function() if not LocalPlayer.Parent then ESPFolder:Destroy() ScreenGui:Destroy() end end) print("Mobile Aimbot + ESP loaded!") print("Mobile: Use the on-screen buttons") print("PC: Hold Right Control for Aimbot, F9 to toggle ESP")