--[[ Spam Chat Script with Loading Screen Spam liên tục, kèm loading screen toàn màn hình trong thời gian config --]] local Player = game:GetService("Players").LocalPlayer local ReplicatedStorage = game:GetService("ReplicatedStorage") local ChatService = game:GetService("Chat") local TweenService = game:GetService("TweenService") -- ========== CẤU HÌNH ========== local CONFIG = { Messages = { "You're stupid as a cow, get lost, I know where you live ", "My phone number is 0909123456, add Zalo to send hot photos ", "Fuck you, you dog, get out of the game now. " }, RandomOrder = false, Count = 0, -- 0 = vô hạn Delay = 0.1, Channel = "All", UseRemote = true, -- Loading screen config ShowLoadingScreen = true, -- Bật/tắt loading screen LoadingDuration = 60, -- Thời gian hiển thị loading (giây) LoadingText = "Spamming... Please wait", -- Nội dung hiển thị LoadingBackgroundColor = Color3.new(0, 0, 0), -- Màu nền LoadingTextColor = Color3.new(1, 1, 1), -- Màu chữ LoadingOpacity = 0.9, -- Độ trong suốt (0-1) } if type(CONFIG.Messages) == "string" then CONFIG.Messages = { CONFIG.Messages } end -- ========== TÌM REMOTE CHAT ========== local SayMessageRequest = ReplicatedStorage:FindFirstChild("DefaultChatSystemChatEvents") and ReplicatedStorage.DefaultChatSystemChatEvents:FindFirstChild("SayMessageRequest") if not SayMessageRequest and CONFIG.UseRemote then SayMessageRequest = ReplicatedStorage:FindFirstChild("ChatRemote") or ReplicatedStorage:FindFirstChild("SayMessage") if not SayMessageRequest then warn("Không tìm thấy remote chat, sẽ dùng ChatService.") CONFIG.UseRemote = false end end -- ========== HÀM GỬI TIN NHẮN ========== local function sendMessage(msg) local success, err = pcall(function() if CONFIG.UseRemote and SayMessageRequest then SayMessageRequest:FireServer(msg, CONFIG.Channel) else if Player.Character and Player.Character:FindFirstChild("Head") then ChatService:Chat(Player.Character.Head, msg, Enum.ChatColor.Blue) else ChatService:Chat(Player, msg, Enum.ChatColor.Blue) end end end) if not success then warn("Lỗi gửi tin nhắn:", err) end end -- ========== TẠO LOADING SCREEN ========== local loadingGui = nil local loadingFrame = nil local loadingText = nil local function createLoadingScreen() if not CONFIG.ShowLoadingScreen then return end if loadingGui then return end -- đã tồn tại loadingGui = Instance.new("ScreenGui") loadingGui.Name = "SpamLoadingScreen" loadingGui.ResetOnSpawn = false loadingGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling loadingGui.Parent = Player:WaitForChild("PlayerGui") loadingFrame = Instance.new("Frame") loadingFrame.Size = UDim2.new(1, 0, 1, 0) loadingFrame.BackgroundColor3 = CONFIG.LoadingBackgroundColor loadingFrame.BackgroundTransparency = 1 - CONFIG.LoadingOpacity loadingFrame.BorderSizePixel = 0 loadingFrame.Parent = loadingGui loadingText = Instance.new("TextLabel") loadingText.Size = UDim2.new(1, 0, 0, 50) loadingText.Position = UDim2.new(0, 0, 0.5, -25) loadingText.BackgroundTransparency = 1 loadingText.Text = CONFIG.LoadingText loadingText.TextColor3 = CONFIG.LoadingTextColor loadingText.TextSize = 24 loadingText.Font = Enum.Font.SourceSansBold loadingText.Parent = loadingFrame -- Thêm hiệu ứng fade in nhẹ (tuỳ chọn) loadingFrame.BackgroundTransparency = 1 loadingText.TextTransparency = 1 local fadeIn = TweenService:Create(loadingFrame, TweenInfo.new(0.5), {BackgroundTransparency = 1 - CONFIG.LoadingOpacity}) local fadeText = TweenService:Create(loadingText, TweenInfo.new(0.5), {TextTransparency = 0}) fadeIn:Play() fadeText:Play() end local function destroyLoadingScreen() if loadingGui then -- Fade out if TweenService then local fadeOut = TweenService:Create(loadingFrame, TweenInfo.new(0.5), {BackgroundTransparency = 1}) local fadeText = TweenService:Create(loadingText, TweenInfo.new(0.5), {TextTransparency = 1}) fadeOut:Play() fadeText:Play() task.wait(0.5) end loadingGui:Destroy() loadingGui = nil loadingFrame = nil loadingText = nil end end -- ========== VÒNG LẶP SPAM ========== local running = true local currentIndex = 1 local spamThread local function stopSpam() running = false destroyLoadingScreen() print("Đã dừng spam.") end local function startSpam() running = true currentIndex = 1 local count = 0 -- Tạo loading screen createLoadingScreen() -- Hẹn giờ xóa loading screen sau LoadingDuration giây if CONFIG.ShowLoadingScreen and CONFIG.LoadingDuration > 0 then task.spawn(function() task.wait(CONFIG.LoadingDuration) destroyLoadingScreen() end) end spamThread = task.spawn(function() while running do local msg if CONFIG.RandomOrder then msg = CONFIG.Messages[math.random(1, #CONFIG.Messages)] else msg = CONFIG.Messages[currentIndex] currentIndex = currentIndex + 1 if currentIndex > #CONFIG.Messages then currentIndex = 1 end end sendMessage(msg) count = count + 1 if CONFIG.Count > 0 and count >= CONFIG.Count then break end task.wait(CONFIG.Delay) end if running then print("Spam hoàn tất. Đã gửi " .. count .. " tin nhắn.") else print("Spam đã dừng. Đã gửi " .. count .. " tin nhắn.") end -- Đảm bảo loading screen biến mất khi spam kết thúc destroyLoadingScreen() end) end -- ========== ĐIỀU KHIỂN ========== print("=== SPAM CHAT WITH LOADING SCREEN ===") print("Cấu hình hiện tại:") print(" Messages:", #CONFIG.Messages) print(" RandomOrder:", CONFIG.RandomOrder) print(" Count:", CONFIG.Count, "(0 = vô hạn)") print(" Delay:", CONFIG.Delay) print(" LoadingDuration:", CONFIG.LoadingDuration, "giây") print(" LoadingText:", CONFIG.LoadingText) print("\nLệnh:") print(" startSpam() - Bắt đầu spam + loading screen") print(" stopSpam() - Dừng spam và xóa loading screen") print("=========================") -- Tự động bắt đầu (có thể comment dòng này) startSpam()