Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local part=Instance.new("Part")--so we can use tweenservice without actually needing some other part
- local rainbows={}--dont modify, holds bound objects
- local currentcolor=_G.colors[1]--holds the transition
- function bindToRainbow(object)
- table.insert(rainbows,1,object)
- end
- function unbindFromRainbow(object)
- for i,v in ipairs(rainbows) do
- if v==object then
- table.remove(rainbows,i)
- end
- end
- end
- for i,v in pairs(_G.targetmodel:GetDescendants()) do
- if v:IsA("BasePart") then
- bindToRainbow(v)
- end
- end
- game:GetService("RunService").RenderStepped:connect(function()
- currentcolor=part.Color
- for i,v in pairs(rainbows) do
- v.Color=currentcolor
- end
- end)
- while true do
- --game:GetService("RunService").RenderStepped:wait()
- for i,v in pairs(_G.colors) do
- 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
- wait(_G.speed)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement