Advertisement
Steamhesaproblox

Roblox Spam Chat Script

Apr 29th, 2025 (edited)
480
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
RBScript 3.56 KB | Gaming | 0 0
  1. local TweenService = game:GetService("TweenService")
  2. local Player = game:GetService("Players").LocalPlayer
  3. local UserInputService = game:GetService("UserInputService")
  4.  
  5. local ScreenGui = Instance.new("ScreenGui", game.CoreGui)
  6. ScreenGui.Name = "ChatSpamGui"
  7.  
  8. local Frame = Instance.new("Frame", ScreenGui)
  9. Frame.AnchorPoint = Vector2.new(0,0)
  10. Frame.Position = UDim2.new(0.1,0,0.1,0)
  11. Frame.Size = UDim2.new(0,200,0,160)
  12. Frame.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
  13. Frame.Visible = false
  14.  
  15. local UICorner = Instance.new("UICorner", Frame)
  16. UICorner.CornerRadius = UDim.new(0,8)
  17.  
  18. local UIStroke = Instance.new("UIStroke", Frame)
  19. UIStroke.Thickness = 2
  20. UIStroke.Color = Color3.new(1, 1, 1)
  21.  
  22. local Title = Instance.new("TextLabel", Frame)
  23. Title.Size = UDim2.new(1,0,0,25)
  24. Title.BackgroundTransparency = 1
  25. Title.Text = "💬 Chat Spam 💬"
  26. Title.TextColor3 = Color3.new(1,1,1)
  27. Title.TextScaled = true
  28. Title.Font = Enum.Font.Gotham
  29.  
  30. local Box = Instance.new("TextBox", Frame)
  31. Box.Position = UDim2.new(0.05,0,0.3,0)
  32. Box.Size = UDim2.new(0.9,0,0.2,0)
  33. Box.PlaceholderText = "Type your message..."
  34. Box.Text = ""
  35. Box.TextScaled = true
  36. Box.TextColor3 = Color3.new(1, 1, 1)
  37. Box.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
  38. local BoxCorner = Instance.new("UICorner", Box)
  39. BoxCorner.CornerRadius = UDim.new(0,5)
  40.  
  41. local Button = Instance.new("TextButton", Frame)
  42. Button.Position = UDim2.new(0.05,0,0.6,0)
  43. Button.Size = UDim2.new(0.9,0,0.2,0)
  44. Button.Text = "Start Spam"
  45. Button.TextScaled = true
  46. Button.Font = Enum.Font.Gotham
  47. Button.TextColor3 = Color3.new(1, 1, 1)
  48. Button.BackgroundColor3 = Color3.fromRGB(70, 70, 70)
  49. local ButtonCorner = Instance.new("UICorner", Button)
  50. ButtonCorner.CornerRadius = UDim.new(0,5)
  51.  
  52. local ToggleButton = Instance.new("TextButton", ScreenGui)
  53. ToggleButton.Position = UDim2.new(0,10,0,10)
  54. ToggleButton.Size = UDim2.new(0,40,0,40)
  55. ToggleButton.Text = "☰"
  56. ToggleButton.TextScaled = true
  57. ToggleButton.Font = Enum.Font.Gotham
  58. ToggleButton.TextColor3 = Color3.new(1,1,1)
  59. ToggleButton.BackgroundColor3 = Color3.fromRGB(40,40,40)
  60. local ToggleCorner = Instance.new("UICorner", ToggleButton)
  61. ToggleCorner.CornerRadius = UDim.new(0,8)
  62.  
  63. local function enableDragging(frame)
  64.     local dragging = false
  65.     local dragInput, dragStart, startPos
  66.  
  67.     local function update(input)
  68.         local delta = input.Position - dragStart
  69.         frame.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
  70.     end
  71.  
  72.     frame.InputBegan:Connect(function(input)
  73.         if input.UserInputType == Enum.UserInputType.MouseButton1 then
  74.             dragging = true
  75.             dragStart = input.Position
  76.             startPos = frame.Position
  77.             input.Changed:Connect(function()
  78.                 if input.UserInputState == Enum.UserInputState.End then
  79.                     dragging = false
  80.                 end
  81.             end)
  82.         end
  83.     end)
  84.  
  85.     UserInputService.InputChanged:Connect(function(input)
  86.         if input.UserInputType == Enum.UserInputType.MouseMovement and dragging then
  87.             update(input)
  88.         end
  89.     end)
  90. end
  91.  
  92. enableDragging(Frame)
  93. enableDragging(ToggleButton)
  94.  
  95. local active = false
  96. local message = ""
  97.  
  98. Box.FocusLost:Connect(function()
  99.     message = Box.Text
  100. end)
  101.  
  102. Button.MouseButton1Click:Connect(function()
  103.     active = not active
  104.     Button.Text = active and "Stop Spam" or "Start Spam"
  105. end)
  106.  
  107. ToggleButton.MouseButton1Click:Connect(function()
  108.     Frame.Visible = not Frame.Visible
  109. end)
  110.  
  111. spawn(function()
  112.     while true do
  113.         wait(0.5)
  114.         if active and message ~= "" then
  115.             pcall(function()
  116.                 game:GetService("TextChatService").TextChannels.RBXGeneral:SendAsync(message)
  117.             end)
  118.         end
  119.     end
  120. end)
  121.  
Tags: RobloxScript
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement