Advertisement
SebTDZ

Music Gui

Oct 15th, 2019
775
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.77 KB | None | 0 0
  1. -- Farewell Infortality.
  2. -- Version: 2.82
  3. -- Instances:
  4. local __Music__ = Instance.new("ScreenGui")
  5. local Sound = Instance.new("Sound")
  6. local Frame = Instance.new("ImageLabel")
  7. local UIAspectRatioConstraint = Instance.new("UIAspectRatioConstraint")
  8. local Frame2 = Instance.new("ImageLabel")
  9. --Properties:
  10. __Music__.Name = "__Music__"
  11. __Music__.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  12. -- __Music__.ResetOnSpawn = false
  13.  
  14. Sound.Name = "Sound"
  15. Sound.Parent = __Music__
  16.  
  17. Frame.Name = "Frame"
  18. Frame.Parent = __Music__
  19. Frame.AnchorPoint = Vector2.new(0.5, 0.5)
  20. Frame.BackgroundColor3 = Color3.new(1, 1, 1)
  21. Frame.BackgroundTransparency = 1
  22. Frame.Position = UDim2.new(0.5, 0, 0.5, 0)
  23. Frame.Size = UDim2.new(0, 0, 0, 0)
  24. Frame.Image = "rbxassetid://4131455960"
  25. Frame.ImageColor3 = Color3.new(0.25,0.25,0.75)
  26. Frame.ImageTransparency = 0
  27. Frame.ScaleType = Enum.ScaleType.Stretch
  28. Frame.SliceCenter = Rect.new(0, 0, 0, 0)
  29.  
  30. UIAspectRatioConstraint.Name = "UIAspectRatioConstraint"
  31. UIAspectRatioConstraint.Parent = Frame
  32.  
  33. Frame2.Name = "Frame"
  34. Frame2.Parent = Frame
  35. Frame2.AnchorPoint = Vector2.new(0.5, 0.5)
  36. Frame2.BackgroundColor3 = Color3.new(1, 1, 1)
  37. Frame2.BackgroundTransparency = 1
  38. Frame2.Position = UDim2.new(0.5, 0, 0.5, 0)
  39. Frame2.Size = UDim2.new(0.75, 0, 0.75, 0)
  40. Frame2.Image = "rbxassetid://970022625"
  41. Frame2.ScaleType = Enum.ScaleType.Stretch
  42. Frame2.SliceCenter = Rect.new(0, 0, 0, 0)
  43. -- Scripts:
  44. function Play(Id)
  45.     Sound:Stop()
  46.     Sound.SoundId = "rbxassetid://" .. string.format(Id)
  47.     Sound:Play()
  48. end
  49. local MaxSize = 0.1
  50. local PerPL = MaxSize/1000
  51. Play(512482601)
  52. while wait() do
  53.     if Sound.Playing == false then
  54.         __Music__:Remove()
  55.         break
  56.     end
  57.     local Size = 0.2+(Sound.PlaybackLoudness*PerPL)
  58.     Frame.Size = UDim2.new(Size,0,Size,0)
  59. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement