local plrs = game:GetService("Players") local sg = game:GetService("StarterGui") local lp = plrs.LocalPlayer local gui = Instance.new("ScreenGui") gui.Name = "InviteAllGUI" gui.ResetOnSpawn = false gui.IgnoreGuiInset = true gui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling gui.Parent = lp:WaitForChild("PlayerGui") local fr = Instance.new("Frame") fr.Name = "Panel" fr.Size = UDim2.fromOffset(260, 120) fr.AnchorPoint = Vector2.new(1, 1) fr.Position = UDim2.new(1, -20, 1, -20) fr.BackgroundColor3 = Color3.fromRGB(24, 26, 32) fr.BorderSizePixel = 0 fr.Parent = gui local uiCorner = Instance.new("UICorner", fr) uiCorner.CornerRadius = UDim.new(0, 14) local stroke = Instance.new("UIStroke", fr) stroke.Thickness = 1 stroke.Color = Color3.fromRGB(60, 68, 80) stroke.ApplyStrokeMode = Enum.ApplyStrokeMode.Border local title = Instance.new("TextLabel") title.BackgroundTransparency = 1 title.Size = UDim2.new(1, -20, 0, 28) title.Position = UDim2.fromOffset(10, 8) title.Text = "Friends Utility" title.Font = Enum.Font.GothamBold title.TextSize = 16 title.TextColor3 = Color3.fromRGB(235, 240, 255) title.TextXAlignment = Enum.TextXAlignment.Left title.Parent = fr local btn = Instance.new("TextButton") btn.Name = "InviteAll" btn.Size = UDim2.new(1, -20, 0, 40) btn.Position = UDim2.fromOffset(10, 44) btn.Text = "Invite All" btn.Font = Enum.Font.GothamSemibold btn.TextSize = 18 btn.TextColor3 = Color3.fromRGB(20, 22, 26) btn.AutoButtonColor = true btn.BackgroundColor3 = Color3.fromRGB(122, 255, 82) btn.Parent = fr Instance.new("UICorner", btn).CornerRadius = UDim.new(0, 12) local info = Instance.new("TextLabel") info.BackgroundTransparency = 1 info.Size = UDim2.new(1, -20, 0, 22) info.Position = UDim2.fromOffset(10, 90) info.Text = "Ready." info.Font = Enum.Font.Gotham info.TextSize = 14 info.TextColor3 = Color3.fromRGB(190, 198, 210) info.TextXAlignment = Enum.TextXAlignment.Left info.Parent = fr local busy = false local function inviteAll() if busy then return end busy = true btn.AutoButtonColor = false btn.Text = "Inviting..." info.Text = "Working..." local sent, already, errors, skipped = 0, 0, 0, 0 for _, p in ipairs(plrs:GetPlayers()) do if p ~= lp then local okCheck, isFriend = pcall(function() return lp:IsFriendsWith(p.UserId) end) if okCheck and isFriend then already += 1 else local okSend, err = pcall(function() lp:RequestFriendship(p) end) if okSend then sent += 1 else errors += 1 end task.wait(5) end else skipped += 1 end end btn.Text = "Invite All" btn.AutoButtonColor = true busy = false local summary = ("Sent: %d | Already: %d | Errors: %d"):format(sent, already, errors) info.Text = summary pcall(function() sg:SetCore("SendNotification", { Title = "Invite All", Text = summary, Duration = 4 }) end) end btn.MouseButton1Click:Connect(inviteAll)