Advertisement
megablademaster12

audio vis

May 24th, 2018
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --[[
  2. edited by mr steal yo bork with a sweet gui
  3. credits goes to the original creators
  4. --]]
  5.  
  6. -- visualizer
  7. local Parts = {}
  8. local Parts2 = {}
  9. local Direction = 1
  10. local loudness = 0
  11. local TColor = BrickColor.new("Black")
  12. for i = 1, 300 do
  13. local p = Instance.new("Part", game.Players.LocalPlayer.Character.Torso)
  14. p.Size = Vector3.new(0.2, 0.2, 0.2)
  15. p.Anchored = true
  16. p.CanCollide = false
  17. p.Material = "Neon"
  18. p.Position = game.Players.LocalPlayer.Character.Torso.Position
  19. table.insert(Parts, p)
  20. end
  21. for i = 1, 300 do
  22. local p = Instance.new("Part", game.Players.LocalPlayer.Character.Torso)
  23. p.Size = Vector3.new(0.2, 0.2, 0.2)
  24. p.Anchored = true
  25. p.CanCollide = false
  26. p.Material = "Neon"
  27. p.Position = game.Players.LocalPlayer.Character.Torso.Position
  28. table.insert(Parts2, p)
  29. end
  30. local sound = Instance.new("Sound", game.Players.LocalPlayer.Character.Torso)
  31. sound.SoundId = "rbxassetid://681311208"
  32. sound.Volume = 1
  33. sound:Play()
  34. spawn(function()
  35. local SelectedPart = 0
  36. while true do
  37. if Direction == 1 then
  38. if SelectedPart < #Parts then
  39. SelectedPart = SelectedPart + Direction
  40. else
  41. Direction = -1
  42. TColor = BrickColor.Random()
  43. end
  44. elseif Direction == -1 then
  45. if SelectedPart > 1 then
  46. SelectedPart = SelectedPart + Direction
  47. else
  48. Direction = 1
  49. TColor = BrickColor.Random()
  50. end
  51. end
  52. local sel = Parts[SelectedPart]
  53. local sel2 = Parts2[SelectedPart]
  54. sel.BrickColor = BrickColor.Random()
  55. sel2.BrickColor = BrickColor.Random()
  56. loudness = sound.PlaybackLoudness / 500
  57. sel.Size = Vector3.new(loudness, loudness, 0.2)
  58. sel2.Size = Vector3.new(loudness, loudness, 0.2)
  59. wait()
  60. sel.BrickColor = TColor
  61. sel2.BrickColor = TColor
  62. end
  63. end)
  64. game:GetService("RunService").RenderStepped:connect(function()
  65. for i = 1, #Parts do
  66. if i == 1 then
  67. Parts[i].CFrame = Parts[i].CFrame:lerp(game.Players.LocalPlayer.Character.Torso.CFrame, 0.9)
  68. else
  69. 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)
  70. end
  71. end
  72. for i = 1, #Parts2 do
  73. if i == 1 then
  74. Parts2[i].CFrame = Parts2[i].CFrame:lerp(game.Players.LocalPlayer.Character.Torso.CFrame, 0.9)
  75. else
  76. 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)
  77. end
  78. end
  79. end)
  80.  
  81. -- visualizer gui
  82.  
  83. local visualizergui = Instance.new("ScreenGui")
  84. local Frame = Instance.new("Frame")
  85. local idvalue = Instance.new("TextBox")
  86. local play = Instance.new("TextButton")
  87. local volume = Instance.new("TextBox")
  88. local pitch = Instance.new("TextBox")
  89. local close = Instance.new("TextButton")
  90. local min = Instance.new("TextButton")
  91. local credits = Instance.new("TextLabel")
  92. local open = Instance.new("TextButton")
  93. local set2 = Instance.new("TextButton")
  94. local set1 = Instance.new("TextButton")
  95.  
  96. --properties xd
  97. visualizergui.Name = "visualizergui"
  98. visualizergui.Parent = game.Players.LocalPlayer.PlayerGui
  99.  
  100. Frame.Parent = visualizergui
  101. Frame.BackgroundColor3 = Color3.new(0.701961, 0.952941, 1)
  102. Frame.BackgroundTransparency = 0.20000000298023
  103. Frame.BorderColor3 = Color3.new(0.211765, 0.329412, 0.415686)
  104. Frame.BorderSizePixel = 8
  105. Frame.Position = UDim2.new(0, 51, 0, 213)
  106. Frame.Size = UDim2.new(0, 418, 0, 213)
  107. Frame.Active = true
  108. Frame.Draggable = true
  109. Frame.Visible = false
  110.  
  111. idvalue.Name = "idvalue"
  112. idvalue.Parent = Frame
  113. idvalue.BackgroundColor3 = Color3.new(0.666667, 1, 1)
  114. idvalue.BackgroundTransparency = 0.5
  115. idvalue.Size = UDim2.new(0, 418, 0, 50)
  116. idvalue.Font = Enum.Font.Fantasy
  117. idvalue.FontSize = Enum.FontSize.Size24
  118. idvalue.Text = "Put ID plz"
  119. idvalue.TextSize = 24
  120.  
  121. play.Name = "play"
  122. play.Parent = Frame
  123. play.BackgroundColor3 = Color3.new(0.666667, 1, 1)
  124. play.BackgroundTransparency = 0.44999998807907
  125. play.BorderColor3 = Color3.new(0.207843, 0.0901961, 0.0705882)
  126. play.BorderSizePixel = 3
  127. play.Position = UDim2.new(0, 9, 0, 82)
  128. play.Size = UDim2.new(0, 117, 0, 50)
  129. play.Font = Enum.Font.SourceSans
  130. play.FontSize = Enum.FontSize.Size28
  131. play.Text = "Play"
  132. play.TextSize = 28
  133.  
  134. volume.Name = "volume"
  135. volume.Parent = Frame
  136. volume.BackgroundColor3 = Color3.new(0.666667, 1, 1)
  137. volume.BackgroundTransparency = 0.44999998807907
  138. volume.BorderColor3 = Color3.new(0.207843, 0.0901961, 0.0705882)
  139. volume.BorderSizePixel = 3
  140. volume.Position = UDim2.new(0, 151, 0, 82)
  141. volume.Size = UDim2.new(0, 117, 0, 50)
  142. volume.Font = Enum.Font.SourceSans
  143. volume.FontSize = Enum.FontSize.Size28
  144. volume.Text = "Volume"
  145. volume.TextSize = 28
  146.  
  147. pitch.Name = "pitch"
  148. pitch.Parent = Frame
  149. pitch.BackgroundColor3 = Color3.new(0.666667, 1, 1)
  150. pitch.BackgroundTransparency = 0.44999998807907
  151. pitch.BorderColor3 = Color3.new(0.207843, 0.0901961, 0.0705882)
  152. pitch.BorderSizePixel = 3
  153. pitch.Position = UDim2.new(0, 291, 0, 82)
  154. pitch.Size = UDim2.new(0, 117, 0, 50)
  155. pitch.Font = Enum.Font.SourceSans
  156. pitch.FontSize = Enum.FontSize.Size28
  157. pitch.Text = "Pitch"
  158. pitch.TextSize = 28
  159.  
  160. close.Name = "close"
  161. close.Parent = Frame
  162. close.BackgroundColor3 = Color3.new(1, 0, 0.0156863)
  163. close.BackgroundTransparency = 0.40000000596046
  164. close.Position = UDim2.new(0, 393, 0, 190)
  165. close.Size = UDim2.new(0, 25, 0, 23)
  166. close.Font = Enum.Font.SourceSans
  167. close.FontSize = Enum.FontSize.Size28
  168. close.Text = "X"
  169. close.TextSize = 28
  170.  
  171. min.Name = "min"
  172. min.Parent = Frame
  173. min.BackgroundColor3 = Color3.new(0.286275, 0.286275, 1)
  174. min.BackgroundTransparency = 0.40000000596046
  175. min.Position = UDim2.new(0, 357, 0, 190)
  176. min.Size = UDim2.new(0, 25, 0, 23)
  177. min.Font = Enum.Font.SourceSans
  178. min.FontSize = Enum.FontSize.Size36
  179. min.Text = "-"
  180. min.TextSize = 36
  181.  
  182. credits.Name = "credits"
  183. credits.Parent = Frame
  184. credits.BackgroundColor3 = Color3.new(1, 1, 1)
  185. credits.BackgroundTransparency = 1
  186. credits.Position = UDim2.new(0, 0, 0, 161)
  187. credits.Size = UDim2.new(0, 200, 0, 52)
  188. credits.Font = Enum.Font.SourceSans
  189. credits.FontSize = Enum.FontSize.Size14
  190. credits.Text = "credits to me for gui, i didn't make the visualizer credits to whoever leaked it or made it."
  191. credits.TextSize = 14
  192. credits.TextWrapped = true
  193.  
  194. open.Name = "open"
  195. open.Parent = visualizergui
  196. open.BackgroundColor3 = Color3.new(0.666667, 1, 1)
  197. open.BackgroundTransparency = 0.44999998807907
  198. open.BorderColor3 = Color3.new(0.207843, 0.0901961, 0.0705882)
  199. open.BorderSizePixel = 3
  200. open.Position = UDim2.new(0, 0, 0, 400)
  201. open.Size = UDim2.new(0, 59, 0, 50)
  202. open.Font = Enum.Font.SourceSans
  203. open.FontSize = Enum.FontSize.Size28
  204. open.Text = "Open"
  205. open.TextSize = 28
  206. open.Visible = false
  207.  
  208. set2.Name = "set2"
  209. set2.Parent = Frame
  210. set2.BackgroundColor3 = Color3.new(0.666667, 1, 1)
  211. set2.BackgroundTransparency = 0.44999998807907
  212. set2.BorderColor3 = Color3.new(0.207843, 0.0901961, 0.0705882)
  213. set2.BorderSizePixel = 3
  214. set2.Position = UDim2.new(0, 325, 0, 136)
  215. set2.Size = UDim2.new(0, 55, 0, 25)
  216. set2.Font = Enum.Font.SourceSans
  217. set2.FontSize = Enum.FontSize.Size24
  218. set2.Text = "Set"
  219. set2.TextSize = 24
  220. set2.TextWrapped = true
  221.  
  222. set1.Name = "set1"
  223. set1.Parent = Frame
  224. set1.BackgroundColor3 = Color3.new(0.666667, 1, 1)
  225. set1.BackgroundTransparency = 0.44999998807907
  226. set1.BorderColor3 = Color3.new(0.207843, 0.0901961, 0.0705882)
  227. set1.BorderSizePixel = 3
  228. set1.Position = UDim2.new(0, 181, 0, 136)
  229. set1.Size = UDim2.new(0, 55, 0, 25)
  230. set1.Font = Enum.Font.SourceSans
  231. set1.FontSize = Enum.FontSize.Size24
  232. set1.Text = "Set"
  233. set1.TextSize = 24
  234. set1.TextWrapped = true
  235.  
  236. -- functions
  237. function start()
  238. wait(0.5)
  239. Frame.Position = UDim2.new(0, -500, 0, 400)
  240. Frame.Visible = true
  241. Frame:TweenPosition(UDim2.new(0, 0, 0, 400),Enum.EasingDirection.InOut,Enum.EasingStyle.Quint,1)
  242. end
  243.  
  244. if game.Players.LocalPlayer.Character then
  245. start()
  246. else
  247. print'character not found plz try again XD'
  248. end
  249.  
  250. function minimize()
  251. Frame:TweenPosition(UDim2.new(0, 0, 0, 400),Enum.EasingDirection.InOut,Enum.EasingStyle.Quint,1)
  252. credits.Text = ""
  253. min.Text = ""
  254. close.Text = ""
  255. play.Text = ""
  256. pitch.Text = ""
  257. volume.Text = ""
  258. idvalue.Text = ""
  259. set1.Text = ""
  260. set2.Text = ""
  261. Frame:TweenSize(UDim2.new(0, 0, 0, 0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quint,0.5)
  262. credits:TweenSize(UDim2.new(0, 0, 0, 0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quint,0.5)
  263. min:TweenSize(UDim2.new(0, 0, 0, 0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quint,0.5)
  264. close:TweenSize(UDim2.new(0, 0, 0, 0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quint,0.5)
  265. idvalue:TweenSize(UDim2.new(0, 0, 0, 0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quint,0.5)
  266. volume:TweenSize(UDim2.new(0, 0, 0, 0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quint,0.5)
  267. play:TweenSize(UDim2.new(0, 0, 0, 0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quint,0.5)
  268. pitch:TweenSize(UDim2.new(0, 0, 0, 0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quint,0.5)
  269. set1:TweenSize(UDim2.new(0, 0, 0, 0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quint,0.5)
  270. set2:TweenSize(UDim2.new(0, 0, 0, 0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quint,0.5)
  271. Frame:TweenPosition(UDim2.new(0, 0, 0, 400),Enum.EasingDirection.InOut,Enum.EasingStyle.Quint,0.5)
  272. wait(0.5)
  273. Frame.Visible = false
  274. open.Visible = true
  275. end
  276.  
  277. function show()
  278. open.Visible = false
  279. Frame.Position = UDim2.new(0, -500, 0, 400)
  280. Frame.Visible = true
  281. credits.Text = "credits to me for gui, i didn't make the visualizer credits to whoever leaked it or made it."
  282. min.Text = "-"
  283. close.Text = "X"
  284. play.Text = "Play"
  285. pitch.Text = "Pitch"
  286. volume.Text = "Volume"
  287. idvalue.Text = "Put ID plz"
  288. set1.Text = "Set"
  289. set2.Text = "Set"
  290. Frame:TweenSize(UDim2.new(0, 418, 0, 213),Enum.EasingDirection.InOut,Enum.EasingStyle.Quint,0.5)
  291. credits:TweenSize(UDim2.new(0, 200, 0, 52),Enum.EasingDirection.InOut,Enum.EasingStyle.Quint,0.5)
  292. min:TweenSize(UDim2.new(0, 25, 0, 23),Enum.EasingDirection.InOut,Enum.EasingStyle.Quint,0.5)
  293. close:TweenSize(UDim2.new(0, 25, 0, 23),Enum.EasingDirection.InOut,Enum.EasingStyle.Quint,0.5)
  294. idvalue:TweenSize(UDim2.new(0, 418, 0, 50),Enum.EasingDirection.InOut,Enum.EasingStyle.Quint,0.5)
  295. volume:TweenSize(UDim2.new(0, 117, 0, 50),Enum.EasingDirection.InOut,Enum.EasingStyle.Quint,0.5)
  296. play:TweenSize(UDim2.new(0, 117, 0, 50),Enum.EasingDirection.InOut,Enum.EasingStyle.Quint,0.5)
  297. pitch:TweenSize(UDim2.new(0, 117, 0, 50),Enum.EasingDirection.InOut,Enum.EasingStyle.Quint,0.5)
  298. set1:TweenSize(UDim2.new(0, 55, 0, 25),Enum.EasingDirection.InOut,Enum.EasingStyle.Quint,0.5)
  299. set2:TweenSize(UDim2.new(0, 55, 0, 25),Enum.EasingDirection.InOut,Enum.EasingStyle.Quint,0.5)
  300. Frame:TweenPosition(UDim2.new(0, 0, 0, 400),Enum.EasingDirection.InOut,Enum.EasingStyle.Quint, 0.5)
  301. end
  302.  
  303. function exitdatshit()
  304. Frame:TweenPosition(UDim2.new(0, 0, 0, 400),Enum.EasingDirection.InOut,Enum.EasingStyle.Quint,1)
  305. credits.Text = ""
  306. min.Text = ""
  307. close.Text = ""
  308. play.Text = ""
  309. pitch.Text = ""
  310. volume.Text = ""
  311. idvalue.Text = ""
  312. Frame:TweenSize(UDim2.new(0, 0, 0, 0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quint,0.5)
  313. credits:TweenSize(UDim2.new(0, 0, 0, 0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quint,0.5)
  314. min:TweenSize(UDim2.new(0, 0, 0, 0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quint,0.5)
  315. close:TweenSize(UDim2.new(0, 0, 0, 0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quint,0.5)
  316. idvalue:TweenSize(UDim2.new(0, 0, 0, 0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quint,0.5)
  317. volume:TweenSize(UDim2.new(0, 0, 0, 0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quint,0.5)
  318. play:TweenSize(UDim2.new(0, 0, 0, 0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quint,0.5)
  319. pitch:TweenSize(UDim2.new(0, 0, 0, 0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quint,0.5)
  320. set1:TweenSize(UDim2.new(0, 0, 0, 0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quint,0.5)
  321. set2:TweenSize(UDim2.new(0, 0, 0, 0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quint,0.5)
  322. Frame:TweenPosition(UDim2.new(0, 0, 0, 400),Enum.EasingDirection.InOut,Enum.EasingStyle.Quint,0.5)
  323. wait(0.5)
  324. visualizergui:Destroy()
  325. end
  326.  
  327. -- events
  328. wait(1)
  329. min.MouseButton1Down:connect(function()
  330. minimize()
  331. end)
  332.  
  333. open.MouseButton1Down:connect(function()
  334. show()
  335. end)
  336.  
  337. close.MouseButton1Down:connect(function()
  338. exitdatshit()
  339. end)
  340.  
  341. set1.MouseButton1Down:connect(function()
  342. sound.Volume = volume.Text
  343. end)
  344.  
  345. set2.MouseButton1Down:connect(function()
  346. sound.Pitch = pitch.Text
  347. end)
  348.  
  349. play.MouseButton1Down:connect(function()
  350. sound.SoundId = "rbxassetid://" .. idvalue.Text
  351. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement