Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- player = game.Players.LocalPlayer
- local MusicGui = Instance.new("ScreenGui", player.PlayerGui)
- MusicGui.Name = "MusicGui"
- local frame = Instance.new("Frame", MusicGui)
- frame.BackgroundColor3 = Color3.fromRGB(0,0,0)
- frame.BorderColor3 = Color3.fromRGB(0,0,0)
- frame.BorderSizePixel = 5
- frame.Position = UDim2.new(0, 0,0.5, 0)
- frame.Size = UDim2.new(0, 75,0, 50)
- frame.ZIndex = 0
- local tb = Instance.new("TextBox", frame)
- tb.BackgroundColor3 = Color3.fromRGB(255,255,255)
- tb.BorderColor3 = Color3.fromRGB(150,150,150)
- tb.BorderSizePixel = 2
- tb.Position = UDim2.new(-0.006, 0,-0.01, 0)
- tb.Size = UDim2.new(0, 75,0, 25)
- tb.Text = "Sound Id"
- tb.Font = "SourceSansLight"
- tb.TextColor3 = Color3.fromRGB(0,0,0)
- tb.TextScaled = true
- tb.TextWrapped = true
- tb.ZIndex = 2
- local p = Instance.new("TextButton", frame)
- p.Name = "p"
- p.BackgroundColor3 = Color3.fromRGB(0,255,0)
- p.BorderColor3 = Color3.fromRGB(0,170,0)
- p.BorderSizePixel = 2
- p.Position = UDim2.new(-0, 0,0.507, 0)
- p.Size = UDim2.new(0, 35,0, 25)
- p.Text = "Play!"
- p.Font = "Cartoon"
- p.TextColor3 = Color3.fromRGB(0,0,0)
- p.TextScaled = true
- p.TextWrapped = true
- local s = Instance.new("TextButton", frame)
- s.Name = "s"
- s.BackgroundColor3 = Color3.fromRGB(255,0,0)
- s.BorderColor3 = Color3.fromRGB(170,0,0)
- s.BorderSizePixel = 2
- s.Position = UDim2.new(0.539, 0,0.496, 0)
- s.Size = UDim2.new(0, 35,0, 25)
- s.Text = "Stop"
- s.Font = "Cartoon"
- s.TextColor3 = Color3.fromRGB(0,0,0)
- s.TextScaled = true
- s.TextWrapped = true
- function pclick()
- local Id = tb.Text
- local so = Instance.new("Sound", game.Workspace)
- so.SoundId = "rbxassetid://"..Id
- so:play()
- p.Visible = false
- end
- p.MouseButton1Down:connect(pclick)
- function sclick()
- game.Workspace.Sound:remove()
- p.Visible = true
- end
- s.MouseButton1Down:connect(sclick)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement