Advertisement
Guest User

Untitled

a guest
Aug 18th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.50 KB | None | 0 0
  1. local jun = game.Players.LocalPlayer
  2.  
  3. local rs = game:GetService("RunService").RenderStepped
  4. local cam = game.Workspace.CurrentCamera
  5.  
  6. local Colors = {
  7. C1 = "Bright red";
  8. C2 = "Cyan";
  9. C3 = "Mulberry";
  10. C4 = "Pearl"
  11.  
  12. }
  13.  
  14. local fold = jun.Character
  15.  
  16. local Type = Instance.new("NumberValue", fold)
  17. Type.Name = "MTValue"
  18.  
  19.  
  20. -- [[ GUI ]] --
  21.  
  22. local G = Instance.new("ScreenGui", jun.PlayerGui)
  23. G.Name = "SoundGui"
  24.  
  25. local Box = Instance.new("TextBox", G)
  26. Box.Position = UDim2.new(0.6,0,.5,0)
  27. Box.Size = UDim2.new(.15,0,.05,0)
  28. Box.BackgroundColor3 = Color3.new(255,255,255)
  29. Box.BorderSizePixel = 0
  30. Box.Text = "Song Here"
  31.  
  32.  
  33.  
  34. local B1 = Instance.new("TextButton", Box)
  35. B1.Position = UDim2.new(0,0,1,0)
  36. B1.Size = UDim2.new(1,0,1,0)
  37. B1.BackgroundColor3 = Box.BackgroundColor3
  38. B1.BorderSizePixel = Box.BorderSizePixel
  39. B1.Text = "Play"
  40.  
  41.  
  42. local B2 = Instance.new("TextButton", B1)
  43. B2.Position = UDim2.new(0,0,1,0)
  44. B2.Size = UDim2.new(.5,0,1,0)
  45. B2.BackgroundColor3 = Box.BackgroundColor3
  46. B2.BorderSizePixel = Box.BorderSizePixel
  47. B2.Text = "Cylinder"
  48.  
  49. local B3 = Instance.new("TextButton", B2)
  50. B3.Position = UDim2.new(1,0,0,0)
  51. B3.Size = UDim2.new(1,0,1,0)
  52. B3.BackgroundColor3 = Box.BackgroundColor3
  53. B3.BorderSizePixel = Box.BorderSizePixel
  54. B3.Text = "Ball"
  55.  
  56. local B4 = Instance.new("TextButton", B3)
  57. B4.Position = UDim2.new(1,0,0,0)
  58. B4.Size = UDim2.new(1,0,1,0)
  59. B4.BackgroundColor3 = Box.BackgroundColor3
  60. B4.BorderSizePixel = Box.BorderSizePixel
  61. B4.Text = "Block"
  62.  
  63. sound = Instance.new("Sound",jun.Character.Head)
  64. sound.SoundId = "rbxassetid://209864226"
  65. sound.Volume = 10
  66. sound.Looped = true
  67. sound:Play()
  68.  
  69.  
  70. B1.MouseButton1Click:connect(function()
  71. sound:Stop()
  72. sound.SoundId = "http://www.roblox.com/asset/?id="..Box.Text
  73. sound:Play()
  74. end)
  75.  
  76. B1.MouseButton2Click:connect(function()
  77. sound:Stop()
  78. end)
  79.  
  80. B4.MouseButton1Click:connect(function()
  81. Type = 2
  82. end)
  83.  
  84. B2.MouseButton1Click:connect(function()
  85. Type = 1
  86. end)
  87.  
  88.  
  89. B3.MouseButton1Click:connect(function()
  90. Type = 0
  91. end)
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100. -- [[ Audio Visualizer ]] --
  101.  
  102.  
  103. local x = Instance.new("Part", fold)
  104. x.CFrame = jun.Character.Torso.CFrame * CFrame.new(0,0,-4)
  105. x.Anchored = false
  106. x.CanCollide = false
  107. x.BrickColor = BrickColor.new(Colors.C1)
  108. x.Material = "Neon"
  109. x.Size = Vector3.new(2,2,2)
  110.  
  111.  
  112. local x2 = Instance.new("Part", fold)
  113. x2.CFrame = jun.Character.Torso.CFrame * CFrame.new(0,0,-4)
  114. x2.Anchored = false
  115. x2.CanCollide = false
  116. x2.BrickColor = BrickColor.new(Colors.C2)
  117. x2.Material = "Neon"
  118. x2.Size = Vector3.new(2,2,2)
  119.  
  120. local x3 = Instance.new("Part", fold)
  121. x3.CFrame = jun.Character.Torso.CFrame * CFrame.new(0,0,-4)
  122. x3.Anchored = false
  123. x3.CanCollide = false
  124. x3.BrickColor = BrickColor.new(Colors.C3)
  125. x3.Material = "Neon"
  126. x3.Size = Vector3.new(2,2,2)
  127.  
  128.  
  129. local x4 = Instance.new("Part", fold)
  130. x4.CFrame = jun.Character.Torso.CFrame * CFrame.new(0,0,-4)
  131. x4.Anchored = false
  132. x4.CanCollide = false
  133. x4.BrickColor = BrickColor.new(Colors.C4)
  134. x4.Material = "Neon"
  135. x4.Size = Vector3.new(2,2,2)
  136.  
  137. local range = 60
  138. local bright = 500
  139.  
  140. local l1 = Instance.new("PointLight", x)
  141. l1.Brightness = bright
  142. l1.Range = range
  143.  
  144. local l2 = Instance.new("PointLight", x2)
  145. l2.Brightness = bright
  146. l2.Range = range
  147.  
  148. local l3 = Instance.new("PointLight", x3)
  149. l3.Brightness = bright
  150. l3.Range = range
  151.  
  152. local l4 = Instance.new("PointLight", x4)
  153. l4.Brightness = bright
  154. l4.Range = range
  155.  
  156. local m1 = Instance.new("SpecialMesh", x)
  157. m1.MeshType = "Sphere"
  158.  
  159. local m2 = Instance.new("SpecialMesh", x2)
  160. m2.MeshType = m1.MeshType
  161.  
  162. local m3 = Instance.new("SpecialMesh", x3)
  163. m3.MeshType = m1.MeshType
  164.  
  165. local m4 = Instance.new("SpecialMesh", x4)
  166. m4.MeshType = m1.MeshType
  167.  
  168.  
  169. function MeshType()
  170. if Type == 0 then
  171. m1.MeshType = "Sphere"
  172. m2.MeshType = m1.MeshType
  173. m3.MeshType = m1.MeshType
  174. m4.MeshType = m1.MeshType
  175. elseif Type == 1 then
  176. m1.MeshType = "Cylinder"
  177. m2.MeshType = m1.MeshType
  178. m3.MeshType = m1.MeshType
  179. m4.MeshType = m1.MeshType
  180. elseif Type == 2 then
  181. m1.MeshType = "Brick"
  182. m2.MeshType = m1.MeshType
  183. m3.MeshType = m1.MeshType
  184. m4.MeshType = m1.MeshType
  185. end
  186. end
  187.  
  188. function Tween_Blocks()
  189. local loud = 70
  190. local far = 8
  191. x.CFrame = jun.Character.Torso.CFrame * CFrame.new(far,-2.5,-far)
  192. x2.CFrame = jun.Character.Torso.CFrame * CFrame.new(-far,-2.5,far)
  193. x3.CFrame = jun.Character.Torso.CFrame * CFrame.new(-far,-2.5,-far)
  194. x4.CFrame = jun.Character.Torso.CFrame * CFrame.new(far,-2.5,far)
  195. if Type == 1 then
  196. x.CFrame = jun.Character.Torso.CFrame * CFrame.new(far,-2.5,-far) * CFrame.Angles(0,0,1.6)
  197. x2.CFrame = jun.Character.Torso.CFrame * CFrame.new(-far,-2.5,far) * CFrame.Angles(0,0,1.6)
  198. x3.CFrame = jun.Character.Torso.CFrame * CFrame.new(-far,-2.5,-far) * CFrame.Angles(0,0,1.6)
  199. x4.CFrame = jun.Character.Torso.CFrame * CFrame.new(far,-2.5,far) * CFrame.Angles(0,0,1.6)
  200. end
  201. local lo = sound.PlaybackLoudness/loud
  202. local out = .4
  203. m1.Scale = m1.Scale:lerp(Vector3.new(lo,lo,lo), out)
  204. m2.Scale = m2.Scale:lerp(Vector3.new(lo,lo,lo), out)
  205. m3.Scale = m3.Scale:lerp(Vector3.new(lo,lo,lo), out)
  206. m4.Scale = m4.Scale:lerp(Vector3.new(lo,lo,lo), out)
  207. if Type == 2 then
  208. m1.Scale = m1.Scale:lerp(Vector3.new(1, lo, 1), out)
  209. m2.Scale = m2.Scale:lerp(Vector3.new(1, lo, 1), out)
  210. m3.Scale = m3.Scale:lerp(Vector3.new(1, lo, 1), out)
  211. m4.Scale = m4.Scale:lerp(Vector3.new(1, lo, 1), out)
  212.  
  213. end
  214.  
  215.  
  216. -- [[ Other ]] --
  217. local po = 2
  218. l1.Range = po*lo
  219. l2.Range = po*lo
  220. l3.Range = po*lo
  221. l4.Range = po*lo
  222. --cam.FieldOfView = lo+50 -- // Camera Moving
  223. end
  224.  
  225.  
  226. rs:connect(function()
  227. Tween_Blocks()
  228. MeshType()
  229. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement