Advertisement
Thefrozen106

EVEN BETTER

Jun 15th, 2017
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.53 KB | None | 0 0
  1. --HELLO IF YOU WANT TO CHANGE THE SONG JUST CHANGE IT THE BEAT WILL GO WITH THE SONG
  2.  
  3. local Parts = {}
  4. local Parts2 = {}
  5. local Direction = 1
  6. local loudness = 0
  7. local TColor = BrickColor.new("Black")
  8. for i = 1, 100 do
  9. local p = Instance.new("Part", game.Players.LocalPlayer.Character.Torso)
  10. p.Size = Vector3.new(0.2, 0.2, 0.2)
  11. p.Anchored = true
  12. p.CanCollide = false
  13. p.Material = "Neon"
  14. p.Position = game.Players.LocalPlayer.Character.Torso.Position
  15. table.insert(Parts, p)
  16. end
  17. for i = 1, 100 do
  18. local p = Instance.new("Part", game.Players.LocalPlayer.Character.Torso)
  19. p.Size = Vector3.new(0.2, 0.2, 0.2)
  20. p.Anchored = true
  21. p.CanCollide = false
  22. p.Material = "Neon"
  23. p.Position = game.Players.LocalPlayer.Character.Torso.Position
  24. table.insert(Parts2, p)
  25. end
  26. local sound = Instance.new("Sound", game.Players.LocalPlayer.Character.Torso) sound.Looped = true
  27. sound.SoundId = "http://www.roblox.com/asset?id=838621436"
  28. sound.Volume = 100
  29. sound:Play()
  30. spawn(function()
  31. local SelectedPart = 0
  32. while true do
  33. if Direction == 1 then
  34. if SelectedPart < #Parts then
  35. SelectedPart = SelectedPart + Direction
  36. else
  37. Direction = -1
  38. TColor = BrickColor.Random()
  39. end
  40. elseif Direction == -1 then
  41. if SelectedPart > 1 then
  42. SelectedPart = SelectedPart + Direction
  43. else
  44. Direction = 1
  45. TColor = BrickColor.Random()
  46. end
  47. end
  48. local sel = Parts[SelectedPart]
  49. local sel2 = Parts2[SelectedPart]
  50. sel.BrickColor = BrickColor.Random()
  51. sel2.BrickColor = BrickColor.Random()
  52. loudness = sound.PlaybackLoudness / 500
  53. sel.Size = Vector3.new(loudness, loudness, 0.2)
  54. sel2.Size = Vector3.new(loudness, loudness, 0.2)
  55. wait()
  56. sel.BrickColor = TColor
  57. sel2.BrickColor = TColor
  58. end
  59. end)
  60. game:GetService("RunService").RenderStepped:connect(function()
  61. for i = 1, #Parts do
  62. if i == 1 then
  63. Parts[i].CFrame = Parts[i].CFrame:lerp(game.Players.LocalPlayer.Character.Torso.CFrame, 0.9)
  64. else
  65. 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)
  66. end
  67. end
  68. for i = 1, #Parts2 do
  69. if i == 1 then
  70. Parts2[i].CFrame = Parts2[i].CFrame:lerp(game.Players.LocalPlayer.Character.Torso.CFrame, 0.9)
  71. else
  72. 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)
  73. end
  74. end
  75. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement