Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local ScreenGui = Instance.new("ScreenGui")
- local IntroFrame = Instance.new("Frame")
- local IntroLabel = Instance.new("TextLabel")
- local Frame = Instance.new("Frame")
- local TextLabel = Instance.new("TextLabel")
- local TextBox = Instance.new("TextBox")
- local Button = Instance.new("TextButton")
- local CloseButton = Instance.new("TextButton")
- local TitleLabel = Instance.new("TextLabel")
- local Sound = Instance.new("Sound")
- --
- ScreenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
- ScreenGui.Name = "MusicPlayer"
- --
- IntroFrame.Parent = ScreenGui
- IntroFrame.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
- IntroFrame.Size = UDim2.new(1, 0, 1, 0)
- IntroLabel.Parent = IntroFrame
- IntroLabel.BackgroundTransparency = 1
- IntroLabel.Size = UDim2.new(1, 0, 1, 0)
- IntroLabel.Text = "Made by Mr. Showcaser"
- IntroLabel.Font = Enum.Font.SourceSansBold
- IntroLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
- IntroLabel.TextScaled = true
- --
- Frame.Parent = ScreenGui
- Frame.BackgroundColor3 = Color3.fromRGB(135, 206, 250) -- Sky blue background
- Frame.Position = UDim2.new(0.35, 0, 0.35, 0)
- Frame.Size = UDim2.new(0.3, 0, 0.4, 0) -- Adjusted height for the title
- Frame.Visible = false -- Initially hidden
- --
- TitleLabel.Parent = Frame
- TitleLabel.BackgroundTransparency = 1
- TitleLabel.Size = UDim2.new(1, 0, 0.1, 0)
- TitleLabel.Text = "Music Player v2"
- TitleLabel.Font = Enum.Font.SourceSansBold
- TitleLabel.TextColor3 = Color3.fromRGB(0, 0, 0)
- TitleLabel.TextScaled = true
- --
- TextLabel.Parent = Frame
- TextLabel.BackgroundTransparency = 1
- TextLabel.Position = UDim2.new(0, 0, 0.1, 0)
- TextLabel.Size = UDim2.new(1, 0, 0.1, 0)
- TextLabel.Text = "Enter Song ID:"
- TextLabel.Font = Enum.Font.SourceSansSemibold
- TextLabel.TextColor3 = Color3.fromRGB(0, 0, 0)
- TextLabel.TextScaled = true
- --
- TextBox.Parent = Frame
- TextBox.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- TextBox.BackgroundTransparency = 0.5
- TextBox.Position = UDim2.new(0, 0, 0.2, 0)
- TextBox.Size = UDim2.new(1, 0, 0.15, 0)
- TextBox.TextColor3 = Color3.fromRGB(0, 0, 0)
- TextBox.Font = Enum.Font.SourceSansSemibold
- --
- Button.Parent = Frame
- Button.BackgroundColor3 = Color3.fromRGB(0, 255, 0)
- Button.Position = UDim2.new(0, 0, 0.4, 0)
- Button.Size = UDim2.new(0.5, 0, 0.15, 0)
- Button.Text = "Play"
- Button.TextColor3 = Color3.fromRGB(0, 0, 0)
- --
- CloseButton.Parent = Frame
- CloseButton.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
- CloseButton.Position = UDim2.new(0.5, 0, 0.4, 0)
- CloseButton.Size = UDim2.new(0.5, 0, 0.15, 0)
- CloseButton.Text = "Close"
- CloseButton.TextColor3 = Color3.fromRGB(0, 0, 0)
- --
- Sound.Parent = game.Workspace
- Sound.Volume = 1
- Sound.PlayOnRemove = false
- --
- Button.MouseButton1Click:Connect(function()
- local songId = TextBox.Text
- if songId ~= "" then
- Sound.SoundId = "rbxassetid://" .. songId
- Sound:Play()
- end
- end)
- --
- CloseButton.MouseButton1Click:Connect(function()
- ScreenGui:Destroy()
- end)
- --
- wait(3) -- Display the intro for 3 seconds
- IntroFrame:Destroy() --
- Frame.Visible = true --
Advertisement
Add Comment
Please, Sign In to add comment