Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local parts = {}
- local rainbow = {}
- for i = 0,1,1/100 do
- local color = Color3.fromHSV(i,1,1)
- table.insert(rainbow,color)
- end
- local HumanoidRootPart = game.Players.LocalPlayer.Character.HumanoidRootPart
- for i = 1,200 do
- local p = Instance.new('Part')
- p.Shape = 'Ball'
- p.TopSurface=10
- p.BottomSurface=10
- p.Size = Vector3.new(.2,.2,.2)
- p.Anchored=true
- p.CanCollide = false
- table.insert(parts,p)
- p.Parent = HumanoidRootPart
- p.Material = 'Neon'
- end
- local currcol = 0
- spawn(function()
- while wait(.1) do
- local color
- currcol = currcol + 1
- if rainbow[currcol] then
- color = rainbow[currcol]
- else
- currcol = 1
- color = rainbow[1]
- end
- spawn(function()
- for i,v in pairs(parts) do
- v.Color = color
- --game:service'RunService'.RenderStepped:wait()
- end
- end)
- end
- end)
- local s = Instance.new('Sound',HumanoidRootPart)
- s.SoundId = 'rbxassetid://495007399'
- s.Volume = 7
- s:Play()
- rot = 1
- game.Players.LocalPlayer.Chatted:connect(function(message)
- if message:sub(1,4) == 'play' then
- s:Stop()
- s.SoundId = 'rbxassetid://'..message:sub(6)
- s:Play()
- end
- end)
- game:service'RunService'.RenderStepped:connect(function()
- local deb = s.PlaybackLoudness/200
- rot = rot + deb/2
- for i,v in pairs(parts) do
- local angle = math.rad(i*(360/#parts) + rot)
- v.CFrame = v.CFrame:lerp(CFrame.new(HumanoidRootPart.Position.X,3,HumanoidRootPart.Position.Z)
- * CFrame.Angles(math.rad(90),0,0)
- * CFrame.new(0,0,1.7)
- * CFrame.Angles(0,0,angle)
- * CFrame.new(0,math.sin(tick()+i)*deb + 3,1)
- ,.2)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement