_G.AegisConfig = _G.AegisConfig or { Cooldown = 0.4 } local Players = game:GetService("Players") local LocalPlayer = Players.LocalPlayer local ReplicatedStorage = game:GetService("ReplicatedStorage") local RunService = game:GetService("RunService") local UserInputService = game:GetService("UserInputService") local TargetRemote = nil pcall(function() TargetRemote = ReplicatedStorage:WaitForChild("ReplicatedStorage Package"):WaitForChild("Remote Events"):WaitForChild("SendPacket") end) if not TargetRemote then pcall(function() local folder = ReplicatedStorage:GetChildren() if folder then local subFolder = folder:GetChildren() if subFolder and subFolder:FindFirstChild("SendPacket") then TargetRemote = subFolder.SendPacket end end end) end if not TargetRemote then for _, obj in ipairs(ReplicatedStorage:GetDescendants()) do if obj:IsA("RemoteEvent") and obj.Name == "SendPacket" then TargetRemote = obj break end end end local function getClosestPlayer() local myChar = LocalPlayer.Character local myRoot = myChar and myChar:FindFirstChild("HumanoidRootPart") if not myRoot then return nil end local myPos = myRoot.Position local closestPlayer = nil local shortestDistance = 160 for _, player in ipairs(Players:GetPlayers()) do if player ~= LocalPlayer then local char = player.Character local root = char and char:FindFirstChild("HumanoidRootPart") local hum = char and char:FindFirstChildOfClass("Humanoid") if root and hum and hum.Health > 0 then local distance = (myPos - root.Position).Magnitude if distance < shortestDistance then shortestDistance = distance closestPlayer = player end end end end return closestPlayer end local ScreenGui = Instance.new("ScreenGui") ScreenGui.Name = "AegisWarsHubV6" ScreenGui.ResetOnSpawn = false ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling local pGui = LocalPlayer:WaitForChild("PlayerGui", 10) if pGui then ScreenGui.Parent = pGui end pcall(function() if pGui then for _, oldGui in ipairs(pGui:GetChildren()) do if (oldGui.Name == "AegisWarsHubV5" or oldGui.Name == "AegisWarsHubV6") and oldGui ~= ScreenGui then oldGui:Destroy() end end end end) local ButtonContainer = Instance.new("Frame") ButtonContainer.Size = UDim2.new(0, 94, 0, 44) ButtonContainer.Position = UDim2.new(0.5, -47, 0.75, 0) ButtonContainer.BackgroundColor3 = Color3.fromRGB(45, 45, 60) ButtonContainer.BorderSizePixel = 0 ButtonContainer.ZIndex = 3 ButtonContainer.Parent = ScreenGui local ContainerCorner = Instance.new("UICorner") ContainerCorner.CornerRadius = UDim.new(0, 9) ContainerCorner.Parent = ButtonContainer local MainButton = Instance.new("TextButton") MainButton.Size = UDim2.new(0, 90, 0, 40) MainButton.Position = UDim2.new(0, 2, 0, 2) MainButton.BackgroundColor3 = Color3.fromRGB(25, 25, 35) MainButton.Text = "MLG: OFF" MainButton.TextColor3 = Color3.fromRGB(255, 75, 75) MainButton.Font = Enum.Font.GothamBold MainButton.TextSize = 11 MainButton.BorderSizePixel = 0 MainButton.ZIndex = 5 MainButton.Parent = ButtonContainer local ButtonCorner = Instance.new("UICorner") ButtonCorner.CornerRadius = UDim.new(0, 8) ButtonCorner.Parent = MainButton local dragging = false local dragInput, dragStart, startPos local function update(input) local delta = input.Position - dragStart ButtonContainer.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y) end MainButton.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then dragging = true dragStart = input.Position startPos = ButtonContainer.Position input.Changed:Connect(function() if input.UserInputState == Enum.UserInputState.End then dragging = false end end) end end) MainButton.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) local systemEnabled = false MainButton.MouseButton1Click:Connect(function() systemEnabled = not systemEnabled if systemEnabled then MainButton.Text = "MLG: ON" MainButton.TextColor3 = Color3.fromRGB(0, 255, 140) MainButton.BackgroundColor3 = Color3.fromRGB(20, 35, 25) ButtonContainer.BackgroundColor3 = Color3.fromRGB(0, 200, 100) else MainButton.Text = "MLG: OFF" MainButton.TextColor3 = Color3.fromRGB(255, 75, 75) MainButton.BackgroundColor3 = Color3.fromRGB(25, 25, 35) ButtonContainer.BackgroundColor3 = Color3.fromRGB(45, 45, 60) end end) local lockoutMLG = false if _G.AegisHeartbeat then _G.AegisHeartbeat:Disconnect() end _G.AegisHeartbeat = RunService.Heartbeat:Connect(function() if not TargetRemote or not systemEnabled then return end local myChar = LocalPlayer.Character local target = getClosestPlayer() if not target or not target.Character then return end local targetRoot = target.Character:FindFirstChild("HumanoidRootPart") local myRoot = myChar and myChar:FindFirstChild("HumanoidRootPart") if not targetRoot or not myRoot then return end if not lockoutMLG then lockoutMLG = true task.spawn(function() local calculatedCFramePayload = CFrame.new(myRoot.Position, targetRoot.Position) TargetRemote:FireServer("Use Ability", "Main Move", calculatedCFramePayload) task.wait(_G.AegisConfig.Cooldown) lockoutMLG = false end) end end)