Advertisement
Blueisim

Untitled

Aug 14th, 2016 (edited)
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. local part=Instance.new("Part")--so we can use tweenservice without actually needing some other part
  2. local rainbows={}--dont modify, holds bound objects
  3. local currentcolor=_G.colors[1]--holds the transition
  4. function bindToRainbow(object)
  5. table.insert(rainbows,1,object)
  6. end
  7. function unbindFromRainbow(object)
  8. for i,v in ipairs(rainbows) do
  9. if v==object then
  10. table.remove(rainbows,i)
  11. end
  12. end
  13. end
  14.  
  15. for i,v in pairs(_G.targetmodel:GetDescendants()) do
  16. if v:IsA("BasePart") then
  17. bindToRainbow(v)
  18. end
  19. end
  20. game:GetService("RunService").RenderStepped:connect(function()
  21. currentcolor=part.Color
  22. for i,v in pairs(rainbows) do
  23. v.Color=currentcolor
  24. end
  25. end)
  26. while true do
  27. --game:GetService("RunService").RenderStepped:wait()
  28. for i,v in pairs(_G.colors) do
  29. game:GetService("TweenService"):Create(part,TweenInfo.new(_G.speed,_G.easinginfo[1],_G.easinginfo[2]),{Color=v}):Play()--dont mind this gross code, use the config
  30. wait(_G.speed)
  31. end
  32. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement