Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Instances:
- local Songs = Instance.new("ScreenGui")
- local Frame = Instance.new("Frame")
- local Mute = Instance.new("TextButton")
- local NowPlaying = Instance.new("TextLabel")
- --Properties:
- Songs.Name = "Songs"
- Songs.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
- Songs.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
- Songs.ResetOnSpawn = false
- Frame.Parent = Songs
- Frame.AnchorPoint = Vector2.new(1, 1)
- Frame.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- Frame.BackgroundTransparency = 1.000
- Frame.Position = UDim2.new(1, 0, 1, 0)
- Frame.Size = UDim2.new(0.200000003, 0, 0.150000006, 0)
- Mute.Name = "Mute"
- Mute.Parent = Frame
- Mute.AnchorPoint = Vector2.new(1, 1)
- Mute.BackgroundColor3 = Color3.fromRGB(255, 0, 251)
- Mute.BackgroundTransparency = 0.500
- Mute.BorderSizePixel = 0
- Mute.Position = UDim2.new(1, -3, 1, -3)
- Mute.Size = UDim2.new(0.300000012, 0, 0.200000003, 0)
- Mute.Font = Enum.Font.SourceSans
- Mute.Text = "Mute"
- Mute.TextColor3 = Color3.fromRGB(255, 255, 255)
- Mute.TextScaled = true
- Mute.TextSize = 14.000
- Mute.TextWrapped = true
- NowPlaying.Name = "NowPlaying"
- NowPlaying.Parent = Frame
- NowPlaying.AnchorPoint = Vector2.new(0, 1)
- NowPlaying.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
- NowPlaying.BackgroundTransparency = 0.500
- NowPlaying.Position = UDim2.new(1.10000002, -3, 0.75, 0)
- NowPlaying.Size = UDim2.new(1, 0, 0.449999988, 0)
- NowPlaying.Font = Enum.Font.SourceSans
- NowPlaying.Text = "Now playing: Garbage truck"
- NowPlaying.TextColor3 = Color3.fromRGB(255, 255, 255)
- NowPlaying.TextSize = 22.000
- script.Parent = owner.PlayerGui
- local songlist = {}
- muted = false
- currentsong = 1
- rbx = game:GetService("MarketplaceService")
- song = Instance.new("Sound",Songs)
- song.Volume = 0.4
- lastsong = 0
- -- rbx:GetProductInfo().Name
- local muted = false
- Mute.MouseButton1Click:Connect(function()
- if not muted then
- muted = true
- Mute.BackgroundColor3 = Color3.fromRGB(0,0,0)
- Mute.Text = "Unmute"
- else
- muted = false
- Mute.BackgroundColor3 = Color3.fromRGB(255, 0, 251)
- Mute.Text = "Mute"
- end
- end)
- local songs = {
- 911993485,
- 4110953040,
- 838005568,
- 2217398035,
- 1625489737,
- 1402202152,
- 1045722860,
- 1339865767,
- 5686389321,
- 5630330827,
- 5196933474,
- 5046738115,
- 5523078772,
- 961018305,
- 895079632,
- 4924129997,
- 5554411383,
- 2522691284,
- 4069430993,
- 3328634141,
- 2654040596,
- 4963202696,
- 1180273873,
- 2482937864,
- 1123126733,
- 4595789343,
- 2393991991,
- 5034732210,
- 1938554614,
- 1591776686,
- 3406661902,
- 5011189105,
- 3315991165,
- 1866644818
- }
- local function copyarray(original)
- local copy = {}
- for k, v in pairs(original) do
- if type(v) == "table" then
- v = copyarray(v)
- end
- copy[k] = v
- end
- return copy
- end
- function shufflesongs()
- local s = copyarray(songs)
- for i,v in pairs(songlist) do
- table.remove(songlist,1)
- end
- for i=1,#s do
- local num = math.random(1,#s)
- table.insert(songlist,s[num])
- table.remove(s,num)
- end
- end
- shufflesongs()
- coroutine.resume(coroutine.create(function()
- while wait() do
- if not muted then
- if lastsong ~= songlist[currentsong] then
- song.SoundId = "rbxassetid://"..tostring(songlist[currentsong])
- song:Play()
- lastsong = songlist[currentsong]
- NowPlaying.Text = "Now playing: "..rbx:GetProductInfo(songlist[currentsong]).Name
- NowPlaying:TweenPosition(UDim2.new(0,-3,0.75,0),Enum.EasingDirection.Out,Enum.EasingStyle.Back,0.7,true)
- coroutine.resume(coroutine.create(function()
- wait(4)
- NowPlaying:TweenPosition(UDim2.new(1.1,-3,0.75,0),Enum.EasingDirection.In,Enum.EasingStyle.Back,0.7,true)
- end))
- repeat wait(.5) until song.Playing == false or muted
- currentsong = currentsong + 1
- if currentsong > #songlist then
- currentsong = 1
- shufflesongs()
- end
- else
- currentsong = currentsong + 1
- end
- else
- song:Stop()
- wait(1)
- end
- end
- end))
- owner.Chatted:Connect(function(msg)
- if string.lower(msg) == ";quit" then
- Songs:Destroy()
- script:Destroy()
- end
- end)
Add Comment
Please, Sign In to add comment