Advertisement
mrmrcoder

Roblox Chat Troll GUI

Aug 30th, 2020 (edited)
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.68 KB | None | 0 0
  1. -- made by obpot on roblox
  2. local plr = game.Players.LocalPlayer
  3. local Gui =Instance.new("ScreenGui",plr.PlayerGui)
  4. local frame = Instance.new("Frame",Gui)
  5. frame.Selectable = true
  6. frame.Active = true
  7. frame.Draggable = true
  8. frame.Position = UDim2.fromScale(0.348,0.383)
  9. frame.Size = UDim2.fromOffset(251,156)
  10. local TextBox = Instance.new("TextBox",frame)
  11. TextBox.Position = UDim2.fromScale(0.1,0.147)
  12. TextBox.Size = UDim2.fromOffset(200,50)
  13. TextBox.Text = "Text here"
  14. TextBox.ClearTextOnFocus = false
  15. waitbox = Instance.new("TextBox",frame)
  16. waitbox.ClearTextOnFocus = false
  17.  
  18. waitbox.Position = UDim2.fromScale(0.1,0.899)
  19. waitbox.Size = UDim2.fromOffset(100,25)
  20. waitbox.Text = "Number in seconds"
  21. local button1 = Instance.new("TextButton",frame)
  22. button1.Text = "Chat!"
  23. button1.TextScaled = true
  24. button1.Size = UDim2.fromOffset(175,25)
  25. button1.Position =UDim2.fromScale(0.1400,0.468)
  26. button1.BackgroundColor3 = Color3.fromRGB(0,255,0)
  27. button1.TextColor3 = Color3.fromRGB(255,255,255)
  28. button2 = button1:Clone(frame)
  29. button2.Parent = frame
  30. button2.Position = UDim2.fromScale(0.1400,0.699)
  31. button2.BackgroundColor3 = Color3.fromRGB(255,0,0)
  32. button2.Text = "Spam/Stop Spam"
  33. spamming = false
  34. button1.MouseButton1Click:Connect(function()
  35.    
  36.    
  37.    
  38.         game.ReplicatedStorage.DefaultChatSystemChatEvents.SayMessageRequest:FireServer(TextBox.Text, "All")
  39.    
  40.    
  41. end)
  42.  
  43.  
  44. button2.MouseButton1Click:Connect(function()
  45.     if spamming == false then
  46.         spamming = true
  47.     elseif spamming == true then
  48.         spamming = false
  49.     end
  50.    
  51.    
  52.     while spamming == true do
  53.         wait(waitbox.Text)
  54.         game.ReplicatedStorage.DefaultChatSystemChatEvents.SayMessageRequest:FireServer(TextBox.Text, "All")
  55.     end
  56. end)
  57.  
  58.  
  59.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement