RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"make a music gui that appears on the creators pov and has music selections"
-- local script (StarterGUI) local player = game.Players.LocalPlayer local screenGui = Instance.new("ScreenGui", player.PlayerGui) local background = Instance.new("Frame", screenGui) background.BackgroundColor3 = Color3.fromRGB(0, 0, 0) background.Size = UDim2.new(0.3, 0, 0.5, 0) background.Position = UDim2.new(0.35, 0, 0.25, 0) local titleLabel = Instance.new("TextLabel", background) titleLabel.Text = "Music Selection" titleLabel.TextColor3 = Color3.fromRGB(255, 255, 255) titleLabel.BackgroundColor3 = Color3.fromRGB(0, 0, 0) titleLabel.Size = UDim2.new(1, 0, 0.1, 0) local musicList = Instance.new("ScrollingFrame", background) musicList.Size = UDim2.new(1, 0, 0.9, 0) musicList.Position = UDim2.new(0, 0, 0.1, 0) musicList.CanvasSize = UDim2.new(1, 0, 5, 0) local function createMusicButton(name, id) local musicButton = Instance.new("TextButton") musicButton.Text = name musicButton.TextColor3 = Color3.fromRGB(255, 255, 255) musicButton.BackgroundColor3 = Color3.fromRGB(0, 0, 0) musicButton.Size = UDim2.new(1, 0, 0.1, 0) musicButton.BorderSizePixel = 0 musicButton.MouseButton1Click:Connect(function() local sound = Instance.new("Sound", workspace) sound.SoundId = "rbxassetid://" .. id sound:Play() end) return musicButton end local music1 = createMusicButton("Music 1", "123456789") music1.Parent = musicList music1.Position = UDim2.new(0, 0, 0, 0) local music2 = createMusicButton("Music 2", "987654321") music2.Parent = musicList music2.Position = UDim2.new(0, 0, 0.1, 0) -- Add more music buttons as needed