local Players = game:GetService("Players") local TextChatService = game:GetService("TextChatService") local player = Players.LocalPlayer local gui = Instance.new("ScreenGui") gui.Name = "MessagePanel" gui.ResetOnSpawn = false gui.Parent = player:WaitForChild("PlayerGui") -- دکمه باز کردن local open = Instance.new("TextButton") open.Size = UDim2.new(0, 58, 0, 58) open.Position = UDim2.new(1, -75, 0.5, -29) open.BackgroundColor3 = Color3.fromRGB(80, 120, 255) open.Text = "💬" open.TextSize = 27 open.TextColor3 = Color3.new(1, 1, 1) open.Font = Enum.Font.GothamBold open.Parent = gui Instance.new("UICorner", open).CornerRadius = UDim.new(0, 18) -- پنل local panel = Instance.new("Frame") panel.Size = UDim2.new(0, 290, 0, 350) panel.Position = UDim2.new(0.5, -145, 0.5, -175) panel.BackgroundColor3 = Color3.fromRGB(28, 32, 52) panel.Visible = false panel.Parent = gui Instance.new("UICorner", panel).CornerRadius = UDim.new(0, 20) -- عنوان local title = Instance.new("TextLabel") title.Size = UDim2.new(1, -55, 0, 45) title.Position = UDim2.new(0, 10, 0, 5) title.BackgroundTransparency = 1 title.Text = "💬 ارسال پیام" title.TextSize = 23 title.Font = Enum.Font.GothamBold title.TextColor3 = Color3.new(1, 1, 1) title.Parent = panel -- دکمه بستن local close = Instance.new("TextButton") close.Size = UDim2.new(0, 38, 0, 38) close.Position = UDim2.new(1, -48, 0, 8) close.BackgroundColor3 = Color3.fromRGB(220, 70, 80) close.Text = "✕" close.TextSize = 20 close.Font = Enum.Font.GothamBold close.TextColor3 = Color3.new(1, 1, 1) close.Parent = panel Instance.new("UICorner", close).CornerRadius = UDim.new(0, 12) -- نوشته سازنده local creator = Instance.new("TextLabel") creator.Size = UDim2.new(1, -30, 0, 25) creator.Position = UDim2.new(0, 15, 0, 45) creator.BackgroundTransparency = 1 creator.Text = "ساخته شده توسط تیم Amir" creator.TextSize = 15 creator.Font = Enum.Font.GothamBold creator.TextColor3 = Color3.fromRGB(120, 180, 255) creator.Parent = panel -- متن پیام local message = Instance.new("TextBox") message.Size = UDim2.new(1, -30, 0, 45) message.Position = UDim2.new(0, 15, 0, 75) message.BackgroundColor3 = Color3.fromRGB(50, 58, 85) message.PlaceholderText = "📝 متن پیام..." message.Text = "" message.TextSize = 17 message.TextColor3 = Color3.new(1, 1, 1) message.Font = Enum.Font.Gotham message.ClearTextOnFocus = false message.Parent = panel Instance.new("UICorner", message).CornerRadius = UDim.new(0, 12) -- تعداد local count = Instance.new("TextBox") count.Size = UDim2.new(1, -30, 0, 45) count.Position = UDim2.new(0, 15, 0, 130) count.BackgroundColor3 = Color3.fromRGB(50, 58, 85) count.PlaceholderText = "🔢 تعداد (حداکثر 1000)" count.Text = "1" count.TextSize = 17 count.TextColor3 = Color3.new(1, 1, 1) count.Font = Enum.Font.Gotham count.ClearTextOnFocus = false count.Parent = panel Instance.new("UICorner", count).CornerRadius = UDim.new(0, 12) -- شروع local start = Instance.new("TextButton") start.Size = UDim2.new(1, -30, 0, 50) start.Position = UDim2.new(0, 15, 0, 185) start.BackgroundColor3 = Color3.fromRGB(65, 200, 120) start.Text = "▶ شروع" start.TextSize = 20 start.Font = Enum.Font.GothamBold start.TextColor3 = Color3.new(1, 1, 1) start.Parent = panel Instance.new("UICorner", start).CornerRadius = UDim.new(0, 14) -- توقف local stop = Instance.new("TextButton") stop.Size = UDim2.new(1, -30, 0, 50) stop.Position = UDim2.new(0, 15, 0, 245) stop.BackgroundColor3 = Color3.fromRGB(220, 70, 80) stop.Text = "⛔ توقف" stop.TextSize = 20 stop.Font = Enum.Font.GothamBold stop.TextColor3 = Color3.new(1, 1, 1) stop.Parent = panel Instance.new("UICorner", stop).CornerRadius = UDim.new(0, 14) -- وضعیت local status = Instance.new("TextLabel") status.Size = UDim2.new(1, -30, 0, 25) status.Position = UDim2.new(0, 15, 0, 305) status.BackgroundTransparency = 1 status.Text = "آماده" status.TextSize = 14 status.TextColor3 = Color3.fromRGB(180, 190, 210) status.Font = Enum.Font.Gotham status.Parent = panel local sending = false -- باز کردن open.MouseButton1Click:Connect(function() panel.Visible = true end) -- بستن close.MouseButton1Click:Connect(function() panel.Visible = false end) -- شروع ارسال start.MouseButton1Click:Connect(function() if sending then return end local text = message.Text local amount = tonumber(count.Text) if text == "" then status.Text = "❌ متن را وارد کن" return end if not amount then status.Text = "❌ تعداد نامعتبر است" return end amount = math.clamp(math.floor(amount), 1, 1000) local channels = TextChatService:FindFirstChild("TextChannels") local channel = channels and channels:FindFirstChild("RBXGeneral") if not channel then status.Text = "❌ چت اصلی پیدا نشد" return end sending = true start.Text = "⏳ در حال ارسال..." for i = 1, amount do if not sending then break end channel:SendAsync(text) status.Text = "ارسال " .. i .. " از " .. amount task.wait(0.5) end sending = false start.Text = "▶ شروع" if status.Text ~= "⛔ متوقف شد" then status.Text = "✅ ارسال تمام شد" end end) -- توقف stop.MouseButton1Click:Connect(function() if sending then sending = false status.Text = "⛔ متوقف شد" start.Text = "▶ شروع" end end)