Advertisement
VoidScripteay72

Rainbow Chat

Feb 28th, 2023
17
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. local editor = script.Parent
  2. local rainbowColors = {
  3. Color3.fromRGB(255, 0, 0),
  4. Color3.fromRGB(255, 165, 0),
  5. Color3.fromRGB(255, 255, 0),
  6. Color3.fromRGB(0, 128, 0),
  7. Color3.fromRGB(0, 0, 255),
  8. Color3.fromRGB(75, 0, 130),
  9. Color3.fromRGB(238, 130, 238)
  10. }
  11.  
  12. local function setRainbowColors()
  13. local i = 1
  14. for _, child in ipairs(editor:GetChildren()) do
  15. if child:IsA("TextLabel") and child.Font ~= Enum.Font.SourceSansBold then
  16. child.TextColor3 = rainbowColors[i]
  17. i = i + 1
  18. if i > #rainbowColors then
  19. i = 1
  20. end
  21. end
  22. end
  23. end
  24.  
  25. setRainbowColors()
  26. editor.ChildAdded:Connect(setRainbowColors)
  27.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement