-- ACE-STYLE MM2 LAG ASSIST
-- Features: Prediction (Lag Shooting), Draggable GUI, Neon Aesthetic
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local UserInputService = game:GetService("UserInputService")
local LocalPlayer = Players.LocalPlayer
local Camera = workspace.CurrentCamera
-- // SETTINGS
local PredictionAmount = 0.165 -- The "Lag" factor. Higher = shoots further ahead.
local Aiming = false
-- // THE DRAGGABLE GUI
local ScreenGui = Instance.new("ScreenGui", LocalPlayer.PlayerGui)
local Frame = Instance.new("Frame", ScreenGui)
Frame.Size = UDim2.new(0, 180, 0, 80)
Frame.Position = UDim2.new(0.5, -90, 0.1, 0)
Frame.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
Frame.BorderSizePixel = 2
Frame.BorderColor3 = Color3.fromRGB(255, 0, 100) -- Hot Pink "ACE" vibes
local Title = Instance.new("TextLabel", Frame)
Title.Size = UDim2.new(1, 0, 0, 30)
Title.Text = "ACE | LAG-LOCK"
Title.TextColor3 = Color3.new(1, 1, 1)
Title.BackgroundTransparency = 1
Title.Font = Enum.Font.Code
local Info = Instance.new("TextLabel", Frame)
Info.Size = UDim2.new(1, 0, 0, 50)
Info.Position = UDim2.new(0, 0, 0.4, 0)
Info.Text = "HOLD RIGHT-CLICK"
Info.TextColor3 = Color3.fromRGB(150, 150, 150)
Info.BackgroundTransparency = 1
Info.TextSize = 12
-- GUI Dragging Script
local dragging, dragInput, dragStart, startPos
Frame.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 then
dragging = true; dragStart = input.Position; startPos = Frame.Position
end
end)
UserInputService.InputChanged:Connect(function(input)
if dragging and input.UserInputType == Enum.UserInputType.MouseMovement then
local delta = input.Position - dragStart
Frame.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
end
end)
UserInputService.InputEnded:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 then dragging = false end end)
-- // PREDICTION (LAG SHOOTING) LOGIC
local function getClosestPlayer()
local target = nil
local mag = math.huge
for _, v in pairs(Players:GetPlayers()) do
if v ~= LocalPlayer and v.Character and v.Character:FindFirstChild("HumanoidRootPart") then
local pos, vis = Camera:WorldToViewportPoint(v.Character.HumanoidRootPart.Position)
if vis then
local diff = (Vector2.new(pos.X, pos.Y) - UserInputService:GetMouseLocation()).Magnitude
if diff < mag then
mag = diff
target = v.Character
end
end
end
end
return target
end
RunService.RenderStepped:Connect(function()
if UserInputService:IsMouseButtonPressed(Enum.UserInputType.MouseButton2) then
local char = getClosestPlayer()
if char and char:FindFirstChild("HumanoidRootPart") then
-- Prediction: Core part of "Lag Shooting"
-- We take their velocity and multiply it by our prediction factor
local hrp = char.HumanoidRootPart
local predictedPos = hrp.Position + (hrp.Velocity * PredictionAmount)
-- Smoothly move camera toward the predicted "ghost" position
Camera.CFrame = CFrame.new(Camera.CFrame.Position, predictedPos)
end
end
end)