thegameplayer

Untitled

May 23rd, 2023
23
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.17 KB | None | 0 0
  1. if not game:IsLoaded() then
  2. game.Loaded:wait()
  3. end
  4.  
  5. local Players = game:GetService("Players")
  6.  
  7. local Player = Players.LocalPlayer
  8. local PlayerGui = Player.PlayerGui
  9.  
  10. local Chat = PlayerGui:FindFirstChild("Chat")
  11. local MessageDisplay = Chat and Chat:FindFirstChild("Frame_MessageLogDisplay", true)
  12. local Scroller = MessageDisplay and MessageDisplay:FindFirstChild("Scroller")
  13. local Gsub = string.gsub
  14. local Lower = string.lower
  15.  
  16. if not Scroller then return end
  17.  
  18. for _, x in ipairs(Scroller:GetChildren()) do
  19. local MessageTextLabel = x:FindFirstChildWhichIsA("TextLabel")
  20.  
  21. if MessageTextLabel then
  22. local Message = Gsub(MessageTextLabel.Text, "^%s+", "")
  23.  
  24. if Message:match(" ") then
  25. x:Destroy()
  26. end
  27. end
  28. end
  29.  
  30. local ChatAdded
  31. ChatAdded = Scroller.ChildAdded:Connect(function(x)
  32. local MessageTextLabel = x:FindFirstChildWhichIsA("TextLabel")
  33. local SenderTextButton = MessageTextLabel and MessageTextLabel:FindFirstChildWhichIsA("TextButton")
  34. if MessageTextLabel and SenderTextButton then
  35. repeat task.wait() until not MessageTextLabel.Text:match("_+")
  36.  
  37. local Message = Gsub(MessageTextLabel.Text, "^%s+", "")
  38. local Sender = Gsub(SenderTextButton.Text, "[%[%]:]", "")
  39.  
  40. if Players:FindFirstChild(Sender) then
  41. Sender = Players:FindFirstChild(Sender)
  42. else
  43. for _, x in ipairs(Players:GetPlayers()) do
  44. if Sender == x.DisplayName then
  45. Sender = x
  46. end
  47. end
  48. end
  49.  
  50. if type(Sender) == "string" then return end
  51.  
  52. if Message:match(" ") then
  53. x:Destroy()
  54. end
  55. end
  56. end)
  57.  
  58. while true do
  59. local Message = "⛓"
  60. local Unicode = " "
  61. Message = Message .. Unicode:rep(200 - #Message)
  62.  
  63. local ReplicatedStorage = game:GetService("ReplicatedStorage")
  64. local SayMessageRequest = ReplicatedStorage:FindFirstChild("SayMessageRequest", true)
  65.  
  66. if SayMessageRequest then
  67. for i = 1, 4 do
  68. SayMessageRequest:FireServer(Message, "All")
  69. end
  70. end
  71. task.wait(15.5)
  72. end
Add Comment
Please, Sign In to add comment