local currentSong = 0 local songAmount = script.Parent.SongAmount local mainFrame = script.Parent.MainFrame local typeFrame = script.Parent.MainFrame.TypeId local list = script.Parent.MainFrame.ListLayout.List typeFrame.Add.MouseButton1Click:Connect(function() script.Parent.Remotes.AddClient:FireServer(songAmount, typeFrame.TextBox.Text) end) script.Parent.Remotes.PlayServer.OnClientEvent:Connect(function(music) for i, v in pairs(script.Parent.MainFrame.ListLayout.List:GetChildren()) do if v ~= music.Parent then if v:FindFirstChild("Sound") then v.Sound:Stop() end end end if music.IsPlaying == false then if music.IsPaused == true then music:Resume() else music:Play() end else music:Pause() end end)