MaxproGlitcher

Raimbow Chats

Apr 5th, 2025
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.45 KB | None | 0 0
  1.  
  2. local Players = game:GetService("Players")
  3. local LocalPlayer = Players.LocalPlayer
  4. local ChatFrame = LocalPlayer:WaitForChild("PlayerGui"):WaitForChild("Chat"):WaitForChild("Frame")
  5. local MessageLog = ChatFrame:WaitForChild("ChatChannelParentFrame"):WaitForChild("Frame_MessageLogDisplay").Scroller
  6.  
  7. local function interpolateColor(t)
  8. local r = math.sin(t * math.pi * 2) * 0.5 + 0.5
  9. local g = math.sin((t + 0.33) * math.pi * 2) * 0.5 + 0.5
  10. local b = math.sin((t + 0.66) * math.pi * 2) * 0.5 + 0.5
  11. return Color3.fromRGB(r * 255, g * 255, b * 255)
  12. end
  13.  
  14. local function updateRainbow()
  15. local time = 0
  16. while true do
  17. for _, child in pairs(MessageLog:GetChildren()) do
  18. if child:IsA("Frame") then
  19. local textLabel = child:FindFirstChildOfClass("TextLabel")
  20. if textLabel then
  21. local color = interpolateColor(time)
  22. textLabel.TextColor3 = color
  23. end
  24. end
  25. end
  26. time = time + 0.01
  27. if time > 1 then
  28. time = 0
  29. end
  30. wait(0.1)
  31. end
  32. end
  33.  
  34. task.spawn(updateRainbow)
  35.  
  36. MessageLog.ChildAdded:Connect(function(child)
  37. task.wait(0.1)
  38. if child:IsA("Frame") then
  39. local textLabel = child:FindFirstChildOfClass("TextLabel")
  40. if textLabel then
  41. local color = interpolateColor(0)
  42. textLabel.TextColor3 = color
  43. end
  44. end
  45. end)
  46.  
Advertisement
Add Comment
Please, Sign In to add comment