Advertisement
Guest User

Untitled

a guest
Jan 20th, 2019
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.43 KB | None | 0 0
  1. Player = game.Players.LocalPlayer
  2. Character = Player.Character
  3. Root = Character.HumanoidRootPart
  4. local Bars = {}
  5. Global = false
  6. Local = true
  7. hue = 0
  8. inc = 1
  9. Bet = "/"
  10.  
  11. for i = 1,50 do
  12. p = Instance.new("Part")
  13. p.Size = Vector3.new(0.5,0.5,0.5)
  14. p.Color = Color3.fromHSV(math.rad(i*1.11),1,1)
  15. p.Material = "Neon"
  16. p.Anchored = true
  17. p.CanCollide = false
  18. p.Locked = true
  19. p.Parent = Character
  20. p.CFrame = Root.CFrame * CFrame.Angles(0,math.rad(i*7.185),0) * CFrame.new(0,-3,10)
  21. table.insert(Bars,p)
  22. end
  23.  
  24. local Pad = Instance.new("Part")
  25. Pad.Shape = "Cylinder"
  26. Pad.Parent = Character
  27. Pad.Anchored = true
  28. Pad.CanCollide = false
  29. Pad.Locked = true
  30. Pad.CFrame = Root.CFrame * CFrame.new(0,-2.99,0)
  31. Pad.Rotation = Vector3.new(0,0,90)
  32. Pad.Size = Vector3.new(0,20,20)
  33. Pad.Material = "Neon"
  34. Pad.Transparency = 0.5
  35.  
  36. local particle = Instance.new("ParticleEmitter")
  37. particle.Parent = Pad
  38. particle.EmissionDirection = "Right"
  39. particle.Rate = 5
  40. particle.Speed = NumberRange.new(1,1)
  41. particle.Lifetime = NumberRange.new(5)
  42. particle.LockedToPart = true
  43. particle.Transparency = NumberSequence.new(0.75,0,0)
  44. particle.Texture = "rbxassetid://744949545"
  45. particle.LightEmission = 0.5
  46. particle.Size = NumberSequence.new(0.5,0)
  47. particle.Rotation = NumberRange.new(0,180)
  48. particle.RotSpeed = NumberRange.new(5,5)
  49.  
  50. local GUI = Instance.new("BillboardGui")
  51. GUI.Parent = Character.Head
  52. GUI.Name = "Music Gui"
  53. GUI.Adornee = GUI
  54.  
  55. VisName = Instance.new("TextLabel")
  56. VisName.Parent = GUI
  57. VisName.Size = UDim2.new(0,150,0,50)
  58. VisName.TextTransparency = 0
  59. VisName.BackgroundTransparency = 1
  60.  
  61. Sound = Instance.new("Sound")
  62. Sound.Parent = Root
  63. Sound.Volume = 1
  64. Sound.Looped = false
  65.  
  66. Dis = Instance.new("DistortionSoundEffect")
  67. Dis.Level = 0
  68. Dis.Parent = Sound
  69.  
  70. EQ = Instance.new("EqualizerSoundEffect")
  71. EQ.HighGain = 0
  72. EQ.MidGain = 0
  73. EQ.LowGain = 0
  74. EQ.Parent = Sound
  75.  
  76. if Local == true then
  77. Player.Chatted:connect(function(msg)
  78. if msg:sub(1,5):lower()=="play"..Bet then
  79. Sound.SoundId = "rbxassetid://"..tonumber(msg:sub(6))
  80. Sound:Play()
  81. end
  82. if msg:sub(1,5):lower()=="stop"..Bet then
  83. Sound:Stop()
  84. end
  85. if msg:sub(1,6):lower()=="speed"..Bet then
  86. Sound.PlaybackSpeed = tonumber(msg:sub(7))
  87. end
  88. if msg:sub(1,4):lower()=="vol"..Bet then
  89. Sound.Volume = tonumber(msg:sub(5))
  90. end
  91. if msg:sub(1,5):lower()=="loop"..Bet then
  92. Sound.Looped = true
  93. end
  94. if msg:sub(1,7):lower()=="unloop"..Bet then
  95. Sound.Looped = false
  96. end
  97. if msg:sub(1,8):lower()=="distort"..Bet then
  98. Dis.Level = tonumber(msg:sub(9))
  99. end
  100. if msg:sub(1,5):lower()=="bass"..Bet then
  101. EQ.LowGain = tonumber(msg:sub(6))
  102. end
  103. if msg:sub(1,10):lower()=="midtreble"..Bet then
  104. EQ.MidGain = tonumber(msg:sub(11))
  105. end
  106. if msg:sub(1,7):lower()=="treble"..Bet then
  107. EQ.HighGain = tonumber(msg:sub(8))
  108. end
  109. end)
  110. end
  111.  
  112. if Global == true then
  113. for i, player in ipairs(game.Players:GetPlayers()) do
  114. if player then
  115. player.Chatted:connect(function(msg)
  116. if msg:sub(1,5):lower()=="play"..Bet then
  117. Sound.SoundId = "rbxassetid://"..tonumber(msg:sub(6))
  118. Sound:Play()
  119. end
  120. if msg:sub(1,5):lower()=="stop"..Bet then
  121. Sound:Stop()
  122. end
  123. if msg:sub(1,6):lower()=="speed"..Bet then
  124. Sound.PlaybackSpeed = tonumber(msg:sub(7))
  125. end
  126. if msg:sub(1,4):lower()=="vol"..Bet then
  127. Sound.Volume = tonumber(msg:sub(5))
  128. end
  129. if msg:sub(1,5):lower()=="loop"..Bet then
  130. Sound.Looped = true
  131. end
  132. if msg:sub(1,7):lower()=="unloop"..Bet then
  133. Sound.Looped = false
  134. end
  135. if msg:sub(1,7):lower()=="distort"..Bet then
  136. Dis.Level = tonumber(msg:sub(8))
  137. end
  138. if msg:sub(1,5):lower()=="bass"..Bet then
  139. EQ.LowGain = tonumber(msg:sub(6))
  140. end
  141. if msg:sub(1,9):lower()=="midtreble"..Bet then
  142. EQ.MidGain = tonumber(msg:sub(10))
  143. end
  144. if msg:sub(1,6):lower()=="treble"..Bet then
  145. EQ.HighGain = tonumber(msg:sub(7))
  146. end
  147. end)
  148. end
  149. end
  150. end
  151.  
  152. game:GetService("RunService").RenderStepped:connect(function()
  153. hue = hue + inc
  154. for i,v in pairs(Bars) do
  155. Pad.CFrame = Root.CFrame * CFrame.new(0,-2.99,0)
  156. Pad.Rotation = Vector3.new(0,0,90)
  157. Alg = Sound.PlaybackLoudness/math.random(5,50)
  158. Alg3 = Sound.PlaybackLoudness/500
  159. Alg4 = Sound.PlaybackLoudness/100
  160. Alg5 = Sound.PlaybackLoudness/50
  161. v.CFrame = Root.CFrame * CFrame.Angles(0,math.rad(i*7.185),0) * CFrame.new(0,-3,10)
  162. v.Size = v.Size:lerp(Vector3.new(0.5,0.5+Alg,0.5),0.15)
  163. Pad.Color = Pad.Color:lerp(Color3.fromHSV((hue%360)/360,1-Alg3,1),0.25)
  164. particle.Color = ColorSequence.new(Color3.fromHSV((hue%360)/360,1-Alg3,1))
  165. particle.Speed = NumberRange.new(1+Alg4,1+Alg4)
  166. particle.Rate = 5+Alg5
  167. end
  168. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement