Advertisement
Guest User

Untitled

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