local Players = game:GetService("Players") local SoundService = game:GetService("SoundService") local player = Players.LocalPlayer local playerGui = player:WaitForChild("PlayerGui") local screenGui = Instance.new("ScreenGui") screenGui.Name = "MusicPlayerGui" screenGui.ResetOnSpawn = false screenGui.Parent = playerGui local frame = Instance.new("Frame") frame.Size = UDim2.new(0, 320, 0, 170) frame.Position = UDim2.new(0.5, -160, 0, 20) frame.BackgroundColor3 = Color3.fromRGB(30, 30, 30) frame.Parent = screenGui Instance.new("UICorner", frame).CornerRadius = UDim.new(0, 10) local textBox = Instance.new("TextBox") textBox.Size = UDim2.new(1, -20, 0, 40) textBox.Position = UDim2.new(0, 10, 0, 10) textBox.PlaceholderText = "Paste music ID" textBox.Text = "" textBox.ClearTextOnFocus = false textBox.TextColor3 = Color3.new(1, 1, 1) textBox.PlaceholderColor3 = Color3.fromRGB(150, 150, 150) textBox.BackgroundColor3 = Color3.fromRGB(50, 50, 50) textBox.Font = Enum.Font.GothamBold textBox.TextSize = 18 textBox.Parent = frame Instance.new("UICorner", textBox).CornerRadius = UDim.new(0, 8) local function makeButton(text, position, color) local button = Instance.new("TextButton") button.Size = UDim2.new(0.5, -15, 0, 40) button.Position = position button.Text = text button.BackgroundColor3 = color button.TextColor3 = Color3.new(1, 1, 1) button.Font = Enum.Font.GothamBold button.TextSize = 18 button.Parent = frame Instance.new("UICorner", button).CornerRadius = UDim.new(0, 8) return button end local playButton = makeButton("▶ Play", UDim2.new(0, 10, 0, 60), Color3.fromRGB(60, 160, 60)) local stopButton = makeButton("■ Stop", UDim2.new(0.5, 5, 0, 60), Color3.fromRGB(180, 60, 60)) local statusLabel = Instance.new("TextLabel") statusLabel.Size = UDim2.new(1, -20, 0, 40) statusLabel.Position = UDim2.new(0, 10, 0, 115) statusLabel.BackgroundTransparency = 1 statusLabel.Text = "Enter an ID and press Play" statusLabel.TextColor3 = Color3.fromRGB(200, 200, 200) statusLabel.Font = Enum.Font.Gotham statusLabel.TextSize = 14 statusLabel.TextWrapped = true statusLabel.Parent = frame local sound = Instance.new("Sound") sound.Name = "MusicSound" sound.Volume = 1 sound.Looped = true sound.Parent = SoundService local function playMusic() local id = textBox.Text:match("%d+") if not id then statusLabel.Text = "Invalid ID! Paste a music number." return end sound:Stop() sound.SoundId = "rbxassetid://" .. id sound:Play() task.delay(3, function() if not sound.IsLoaded then statusLabel.Text = "Failed to load: invalid ID or unavailable audio" end end) statusLabel.Text = "Playing ID: " .. id end playButton.MouseButton1Click:Connect(playMusic) stopButton.MouseButton1Click:Connect(function() sound:Stop() statusLabel.Text = "Stopped" end) textBox.FocusLost:Connect(function(enterPressed) if enterPressed then playMusic() end end)