Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Settings
- local AudioId = 574539049
- local AudioVol = 2
- local AudioPit = 1
- local IsLooped = true
- --Functions
- local Parts = {}
- local Parts2 = {}
- local Direction = 1
- local loudness = 0
- local TColor = BrickColor.new("Black")
- for i = 1, 100 do
- local p = Instance.new("Part", game.Players.LocalPlayer.Character.Torso)
- p.Size = Vector3.new(0.2, 0.2, 0.2)
- p.Anchored = true
- p.CanCollide = false
- p.Material = "Neon"
- p.Position = game.Players.LocalPlayer.Character.Torso.Position
- table.insert(Parts, p)
- end
- for i = 1, 100 do
- local p = Instance.new("Part", game.Players.LocalPlayer.Character.Torso)
- p.Size = Vector3.new(0.2, 0.2, 0.2)
- p.Anchored = true
- p.CanCollide = false
- p.Material = "Neon"
- p.Position = game.Players.LocalPlayer.Character.Torso.Position
- table.insert(Parts2, p)
- end
- local sound = Instance.new("Sound", game.Players.LocalPlayer.Character.Torso)
- sound.SoundId = "http://www.roblox.com/asset?id="..AudioId
- sound.Volume = AudioVol
- sound.Pitch = AudioPit
- sound.Looped = IsLooped
- sound:Play()
- spawn(function()
- local SelectedPart = 0
- while true do
- if Direction == 1 then
- if SelectedPart < #Parts then
- SelectedPart = SelectedPart + Direction
- else
- Direction = -1
- TColor = BrickColor.Random()
- end
- elseif Direction == -1 then
- if SelectedPart > 1 then
- SelectedPart = SelectedPart + Direction
- else
- Direction = 1
- TColor = BrickColor.Random()
- end
- end
- local sel = Parts[SelectedPart]
- local sel2 = Parts2[SelectedPart]
- sel.BrickColor = BrickColor.Random()
- sel2.BrickColor = BrickColor.Random()
- loudness = sound.PlaybackLoudness / 500
- sel.Size = Vector3.new(loudness, loudness, 0.2)
- sel2.Size = Vector3.new(loudness, loudness, 0.2)
- wait()
- sel.BrickColor = TColor
- sel2.BrickColor = TColor
- end
- end)
- game:GetService("RunService").RenderStepped:connect(function()
- for i = 1, #Parts do
- if i == 1 then
- Parts[i].CFrame = Parts[i].CFrame:lerp(game.Players.LocalPlayer.Character.Torso.CFrame, 0.9)
- else
- Parts[i].CFrame = Parts[i].CFrame:lerp(Parts[i - 1].CFrame * CFrame.Angles(-loudness / 20, math.sin(-loudness / 50), 0) * CFrame.new(0, 0, 0.15), 0.8)
- end
- end
- for i = 1, #Parts2 do
- if i == 1 then
- Parts2[i].CFrame = Parts2[i].CFrame:lerp(game.Players.LocalPlayer.Character.Torso.CFrame, 0.9)
- else
- Parts2[i].CFrame = Parts2[i].CFrame:lerp(Parts2[i - 1].CFrame * CFrame.Angles(-loudness / 20, math.sin(loudness / 50), 0) * CFrame.new(0, 0, 0.15), 0.8)
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement