Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local MusicGui = Instance.new("ScreenGui",owner.PlayerGui)
- MusicGui.Name = "MusicGui"
- function rgb(RED,GREEN,BLUE)
- local Count = 1 / 255
- --Red Count
- local red = Count * RED
- --Green Count
- local green = Count * GREEN
- --Blue Count
- local blue = Count * BLUE
- --Give Color3
- local FColor = Color3.new(red,green,blue)
- return FColor
- end
- local BarHolder = Instance.new("Frame",MusicGui)
- BarHolder.BackgroundColor3 = rgb(185, 185, 185)
- BarHolder.BorderColor3 = rgb(135, 135, 135)
- BarHolder.BorderSizePixel = 10
- BarHolder.Name = "BarHolder"
- BarHolder.Position = UDim2.new(0.1,0,0,10)
- BarHolder.Size = UDim2.new(0.8,0,0.05,0)
- local TimeBar = Instance.new("Frame",BarHolder)
- TimeBar.BackgroundColor3 = rgb(30, 230, 85)
- TimeBar.BorderColor3 = rgb(30, 230, 85)
- TimeBar.BorderSizePixel = 0
- TimeBar.Name = "BarHolder"
- TimeBar.Position = UDim2.new(0,0,0,0)
- TimeBar.Size = UDim2.new(0,0,1,0)
- Music = Instance.new("Sound",workspace)
- Music.SoundId = "rbxassetid://2470261451"
- Music.Name = "Music"
- Music:Play()
- Music.Ended:Connect(function()
- Music:Remove()
- done = false
- end)
- done = true
- if not Music.IsLoaded then
- Music.Loaded:wait()
- end
- local MS = 1 / Music.TimeLength
- while done do
- TimeBar.Size = UDim2.new(MS * Music.TimePosition,0,1,0)
- wait(0.05)
- end
- wait(2)
- MusicGui:Remove()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement