Upscalefanatic3

Audio Visualizer GUI

Jan 28th, 2019
159
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- Objects
  2.  
  3. local WindowH = Instance.new("ScreenGui")
  4. local Window = Instance.new("Frame")
  5. local TopBar = Instance.new("Frame")
  6. local X = Instance.new("ImageButton")
  7. local HeaderOfTopBar = Instance.new("TextLabel")
  8. local InfoButton = Instance.new("TextButton")
  9. local Content = Instance.new("Frame")
  10. local ChangeID = Instance.new("TextButton")
  11. local ChangeShape = Instance.new("TextButton")
  12. local RunDec = Instance.new("TextButton")
  13. local ID = Instance.new("TextBox")
  14. local IDec = Instance.new("TextButton")
  15. local ShapeDec = Instance.new("TextButton")
  16. local Shape = Instance.new("TextBox")
  17. local Info = Instance.new("ScrollingFrame")
  18. local InfoText = Instance.new("TextLabel")
  19.  
  20. -- Properties
  21.  
  22. WindowH.Name = "WindowH"
  23. WindowH.Parent = game.Players.LocalPlayer.PlayerGui
  24.  
  25. Window.Name = "Window"
  26. Window.Parent = WindowH
  27. Window.Active = true
  28. Window.BackgroundColor3 = Color3.new(0.666667, 0, 0)
  29. Window.Draggable = true
  30. Window.Position = UDim2.new(0, 177, 0, 137)
  31. Window.Size = UDim2.new(0, 471, 0, 322)
  32.  
  33. TopBar.Name = "TopBar"
  34. TopBar.Parent = Window
  35. TopBar.BackgroundColor3 = Color3.new(0, 0, 0)
  36. TopBar.BorderSizePixel = 0
  37. TopBar.Size = UDim2.new(0, 471, 0, 28)
  38.  
  39. X.Name = "X"
  40. X.Parent = TopBar
  41. X.BackgroundColor3 = Color3.new(1, 1, 1)
  42. X.Position = UDim2.new(0, 442, 0, 0)
  43. X.Size = UDim2.new(0, 29, 0, 28)
  44. X.Style = Enum.ButtonStyle.RobloxRoundDropdownButton
  45. X.Image = "rbxassetid://190837466"
  46.  
  47. HeaderOfTopBar.Name = "HeaderOfTopBar"
  48. HeaderOfTopBar.Parent = TopBar
  49. HeaderOfTopBar.BackgroundColor3 = Color3.new(0, 0, 0)
  50. HeaderOfTopBar.BackgroundTransparency = 1
  51. HeaderOfTopBar.Size = UDim2.new(0, 367, 0, 28)
  52. HeaderOfTopBar.Font = Enum.Font.Cartoon
  53. HeaderOfTopBar.FontSize = Enum.FontSize.Size14
  54. HeaderOfTopBar.Text = "Welcome to Anonymous's Audio visualizer GUI"
  55. HeaderOfTopBar.TextColor3 = Color3.new(0, 1, 0.498039)
  56. HeaderOfTopBar.TextScaled = true
  57. HeaderOfTopBar.TextSize = 14
  58. HeaderOfTopBar.TextWrapped = true
  59. HeaderOfTopBar.TextXAlignment = Enum.TextXAlignment.Left
  60.  
  61. InfoButton.Name = "InfoButton"
  62. InfoButton.Parent = TopBar
  63. InfoButton.BackgroundColor3 = Color3.new(1, 1, 1)
  64. InfoButton.Position = UDim2.new(0, 373, 0, 0)
  65. InfoButton.Size = UDim2.new(0, 67, 0, 28)
  66. InfoButton.Style = Enum.ButtonStyle.RobloxRoundDropdownButton
  67. InfoButton.Font = Enum.Font.SourceSans
  68. InfoButton.FontSize = Enum.FontSize.Size18
  69. InfoButton.Text = "Info"
  70. InfoButton.TextColor3 = Color3.new(0.0117647, 0.207843, 0)
  71. InfoButton.TextSize = 16
  72.  
  73. Content.Name = "Content"
  74. Content.Parent = Window
  75. Content.BackgroundColor3 = Color3.new(0, 0, 0)
  76. Content.BackgroundTransparency = 0.5
  77. Content.Position = UDim2.new(0, 0, 0, 29)
  78. Content.Size = UDim2.new(0, 471, 0, 293)
  79.  
  80. ChangeID.Name = "ChangeID"
  81. ChangeID.Parent = Content
  82. ChangeID.BackgroundColor3 = Color3.new(1, 1, 1)
  83. ChangeID.Size = UDim2.new(0, 236, 0, 50)
  84. ChangeID.Style = Enum.ButtonStyle.RobloxRoundDropdownButton
  85. ChangeID.FontSize = Enum.FontSize.Size14
  86. ChangeID.Text = "Change Sound Id"
  87. ChangeID.TextColor3 = Color3.new(0, 0, 0)
  88. ChangeID.TextScaled = true
  89. ChangeID.TextSize = 14
  90. ChangeID.TextWrapped = true
  91.  
  92. ChangeShape.Name = "ChangeShape"
  93. ChangeShape.Parent = Content
  94. ChangeShape.BackgroundColor3 = Color3.new(1, 1, 1)
  95. ChangeShape.Position = UDim2.new(0, 0, 0, 55)
  96. ChangeShape.Size = UDim2.new(0, 236, 0, 50)
  97. ChangeShape.Style = Enum.ButtonStyle.RobloxRoundDropdownButton
  98. ChangeShape.FontSize = Enum.FontSize.Size14
  99. ChangeShape.Text = "Change Shape"
  100. ChangeShape.TextColor3 = Color3.new(0, 0, 0)
  101. ChangeShape.TextScaled = true
  102. ChangeShape.TextSize = 14
  103. ChangeShape.TextWrapped = true
  104.  
  105. RunDec.Name = "RunDec"
  106. RunDec.Parent = Content
  107. RunDec.BackgroundColor3 = Color3.new(1, 1, 1)
  108. RunDec.Position = UDim2.new(0, 0, 0, 243)
  109. RunDec.Size = UDim2.new(0, 236, 0, 50)
  110. RunDec.Style = Enum.ButtonStyle.RobloxRoundDropdownButton
  111. RunDec.Font = Enum.Font.SciFi
  112. RunDec.FontSize = Enum.FontSize.Size14
  113. RunDec.Text = "Run Decoration"
  114. RunDec.TextColor3 = Color3.new(0.333333, 0.666667, 1)
  115. RunDec.TextScaled = true
  116. RunDec.TextSize = 14
  117. RunDec.TextWrapped = true
  118.  
  119. ID.Name = "ID"
  120. ID.Parent = Content
  121. ID.BackgroundColor3 = Color3.new(1, 1, 1)
  122. ID.BackgroundTransparency = 1
  123. ID.Position = UDim2.new(0, 271, 0, 0)
  124. ID.Size = UDim2.new(0, 200, 0, 50)
  125. ID.ZIndex = 2
  126. ID.Font = Enum.Font.Bodoni
  127. ID.FontSize = Enum.FontSize.Size14
  128. ID.Text = "Sound ID"
  129. ID.TextScaled = true
  130. ID.TextSize = 14
  131. ID.TextWrapped = true
  132.  
  133. IDec.Name = "IDec"
  134. IDec.Parent = Content
  135. IDec.BackgroundColor3 = Color3.new(1, 1, 1)
  136. IDec.Position = UDim2.new(0, 271, 0, 0)
  137. IDec.Size = UDim2.new(0, 200, 0, 50)
  138. IDec.Style = Enum.ButtonStyle.RobloxRoundButton
  139. IDec.Font = Enum.Font.SourceSans
  140. IDec.FontSize = Enum.FontSize.Size14
  141. IDec.Text = ""
  142. IDec.TextSize = 14
  143.  
  144. ShapeDec.Name = "ShapeDec"
  145. ShapeDec.Parent = Content
  146. ShapeDec.BackgroundColor3 = Color3.new(1, 1, 1)
  147. ShapeDec.Position = UDim2.new(0, 271, 0, 55)
  148. ShapeDec.Size = UDim2.new(0, 200, 0, 50)
  149. ShapeDec.Style = Enum.ButtonStyle.RobloxRoundButton
  150. ShapeDec.Font = Enum.Font.SourceSans
  151. ShapeDec.FontSize = Enum.FontSize.Size14
  152. ShapeDec.Text = ""
  153. ShapeDec.TextSize = 14
  154.  
  155. Shape.Name = "Shape"
  156. Shape.Parent = Content
  157. Shape.BackgroundColor3 = Color3.new(1, 1, 1)
  158. Shape.BackgroundTransparency = 1
  159. Shape.Position = UDim2.new(0, 274, 0, 55)
  160. Shape.Size = UDim2.new(0, 196, 0, 50)
  161. Shape.ZIndex = 2
  162. Shape.Font = Enum.Font.Bodoni
  163. Shape.FontSize = Enum.FontSize.Size14
  164. Shape.Text = "Shape Name"
  165. Shape.TextScaled = true
  166. Shape.TextSize = 14
  167. Shape.TextWrapped = true
  168.  
  169. Info.Name = "Info"
  170. Info.Parent = Window
  171. Info.BackgroundColor3 = Color3.new(0.333333, 0.333333, 0)
  172. Info.BorderSizePixel = 0
  173. Info.Position = UDim2.new(0, 0, 0, 28)
  174. Info.Size = UDim2.new(0, 471, 0, 294)
  175. Info.Visible = false
  176. Info.ZIndex = 3
  177. Info.BottomImage = "rbxassetid://162937863"
  178. Info.CanvasSize = UDim2.new(0, 0, 4, 0)
  179. Info.MidImage = "rbxassetid://162937890"
  180. Info.TopImage = "rbxassetid://162937878"
  181.  
  182. InfoText.Name = "InfoText"
  183. InfoText.Parent = Info
  184. InfoText.BackgroundColor3 = Color3.new(1, 1, 1)
  185. InfoText.BackgroundTransparency = 1
  186. InfoText.Size = UDim2.new(0, 456, 0, 294)
  187. InfoText.ZIndex = 4
  188. InfoText.Font = Enum.Font.Cartoon
  189. InfoText.FontSize = Enum.FontSize.Size24
  190. InfoText.Text = "The currents functions are:\n \n1.Change Shape, shapes are Block and Ball with caps\n \n2.Change Audio ID\n \n3.Run Decoration\nWhat does the 3 functions do?\n \n1.Change the visualizer shape\n \n2.Change the audios's ID to the new one\n \n3.You will get a better experience with (Run Decoration)\n \n 1.FogEnd will change to 500\n \n 2.It would add BlurEffect and a clean sky\n \n 3.Brightness will be 0\n \n 4.Color will be changed to Black to see the Visualizer \n Color Better ;)"
  191. InfoText.TextColor3 = Color3.new(0, 0, 0)
  192. InfoText.TextSize = 20
  193. InfoText.TextXAlignment = Enum.TextXAlignment.Left
  194. InfoText.TextYAlignment = Enum.TextYAlignment.Top
  195. ----------------------------------------------------------------
  196. ----------------------------------------------------------------
  197. InfoButton.MouseButton1Down:Connect(function()
  198. if Info.Visible == false then
  199. Info.Visible = true
  200. else Info.Visible = false
  201. end
  202. end)
  203.  
  204. X.MouseButton1Down:Connect(function()
  205. WindowH:Destroy()
  206. end)
  207.  
  208. ChangeID.MouseButton1Down:Connect(function()
  209. _G.sound2.SoundId = "rbxassetid://"..ID.Text
  210. _G.sound2:Play()
  211. end)
  212.  
  213. ChangeShape.MouseButton1Down:Connect(function()
  214. _G.ball.Shape = Shape.Text
  215. end)
  216.  
  217. RunDec.MouseButton1Down:Connect(function()
  218. local ln = game:FindFirstChildOfClass("Lighting")
  219.  
  220. local blur = Instance.new("ColorCorrectionEffect",game:FindFirstChildOfClass("Lighting"))
  221. blur.Contrast = 1
  222. blur.Brightness = 0.5
  223.  
  224. local sky = Instance.new("Sky",game:FindFirstChildOfClass("Lighting"))
  225. sky.CelestialBodiesShown = false
  226.  
  227. ln.Brightness = 0
  228. ln.Ambient = Color3.new(0,0,0)
  229. ln.OutdoorAmbient = Color3.new(0,0,0)
  230. ln.TimeOfDay = "00:00:00"
  231. ln.FogEnd = 50
  232. ln.FogColor = Color3.new(0,0,0)
  233.  
  234. end)
  235.  
  236. local id = "565649306"
  237.  
  238. local char = game.Players.LocalPlayer.Character
  239. local head = char.Head
  240.  
  241. if head:FindFirstChild("MyAssIsSoCool") then
  242. head:FindFirstChild("MyAssIsSoCool"):Destroy()
  243. end
  244. local model = Instance.new("Model", head)
  245. _G.ball = Instance.new("Part", model)
  246. local ball = _G.ball
  247. _G.sound2 = Instance.new("Sound", ball)
  248. local sound = _G.sound2
  249. _G.light = Instance.new("PointLight", ball)
  250. local light = _G.light
  251. local id2 = "rbxassetid://"..id
  252.  
  253. sound.SoundId = id2
  254. ball.Anchored = true
  255. model.Name = "MyAssIsSoCool"
  256. ball.CanCollide = false
  257. sound:Play()
  258. sound.Volume = 10
  259. ball.Shape = "Block"
  260. ball.Material = "Neon"
  261.  
  262. while wait() do
  263. local sp = sound.PlaybackLoudness/50
  264. ball.BrickColor = BrickColor.Random()
  265. ball.CFrame = head.CFrame*CFrame.new(0,6,0)
  266. ball.Size = Vector3.new(sp,sp,sp)
  267. light.Range = sp+15
  268. light.Brightness = sp+25
  269. light.Color = Color3.new(math.random(),math.random(),math.random())
  270.  
  271.  
  272. end
RAW Paste Data