Advertisement
PotatoSaiyan

My own music gui script

Apr 28th, 2018
253
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.79 KB | None | 0 0
  1. player = game.Players.LocalPlayer
  2.  
  3. local MusicGui = Instance.new("ScreenGui", player.PlayerGui)
  4. MusicGui.Name = "MusicGui"
  5.  
  6. local frame = Instance.new("Frame", MusicGui)
  7. frame.BackgroundColor3 = Color3.fromRGB(0,0,0)
  8. frame.BorderColor3 = Color3.fromRGB(0,0,0)
  9. frame.BorderSizePixel = 5
  10. frame.Position = UDim2.new(0, 0,0.5, 0)
  11. frame.Size = UDim2.new(0, 75,0, 50)
  12. frame.ZIndex = 0
  13.  
  14. local tb = Instance.new("TextBox", frame)
  15. tb.BackgroundColor3 = Color3.fromRGB(255,255,255)
  16. tb.BorderColor3 = Color3.fromRGB(150,150,150)
  17. tb.BorderSizePixel = 2
  18. tb.Position = UDim2.new(-0.006, 0,-0.01, 0)
  19. tb.Size = UDim2.new(0, 75,0, 25)
  20. tb.Text = "Sound Id"
  21. tb.Font = "SourceSansLight"
  22. tb.TextColor3 = Color3.fromRGB(0,0,0)
  23. tb.TextScaled = true
  24. tb.TextWrapped = true
  25. tb.ZIndex = 2
  26.  
  27. local p = Instance.new("TextButton", frame)
  28. p.Name = "p"
  29. p.BackgroundColor3 = Color3.fromRGB(0,255,0)
  30. p.BorderColor3 = Color3.fromRGB(0,170,0)
  31. p.BorderSizePixel = 2
  32. p.Position = UDim2.new(-0, 0,0.507, 0)
  33. p.Size = UDim2.new(0, 35,0, 25)
  34. p.Text = "Play!"
  35. p.Font = "Cartoon"
  36. p.TextColor3 = Color3.fromRGB(0,0,0)
  37. p.TextScaled = true
  38. p.TextWrapped = true
  39.  
  40. local s = Instance.new("TextButton", frame)
  41. s.Name = "s"
  42. s.BackgroundColor3 = Color3.fromRGB(255,0,0)
  43. s.BorderColor3 = Color3.fromRGB(170,0,0)
  44. s.BorderSizePixel = 2
  45. s.Position = UDim2.new(0.539, 0,0.496, 0)
  46. s.Size = UDim2.new(0, 35,0, 25)
  47. s.Text = "Stop"
  48. s.Font = "Cartoon"
  49. s.TextColor3 = Color3.fromRGB(0,0,0)
  50. s.TextScaled = true
  51. s.TextWrapped = true
  52.  
  53. function pclick()
  54. local Id = tb.Text
  55. local so = Instance.new("Sound", game.Workspace)
  56. so.SoundId = "rbxassetid://"..Id
  57. so:play()
  58. p.Visible = false
  59. end
  60.  
  61. p.MouseButton1Down:connect(pclick)
  62.  
  63. function sclick()
  64. game.Workspace.Sound:remove()
  65. p.Visible = true
  66. end
  67.  
  68. s.MouseButton1Down:connect(sclick)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement