Advertisement
memesbruh03

Music Player GUI 1.1.0

Oct 7th, 2016
503
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 7.17 KB | None | 0 0
  1. -- adchand2's music player 1.1.0
  2.  
  3. --[[
  4.  
  5.   what's new?
  6.  
  7. · starting message
  8. · you can now choose what colour you want it to be if you want to post this as a new script/paste
  9. · clicking the play button now shows bgm info on top
  10. · main frame is now draggable (might not work but could be fixed soon)
  11.  
  12. ]]
  13.  
  14. print("Starting adchand2's music player 1.1.0...")
  15.  
  16. -- define player variable
  17. local Player=game.Players.LocalPlayer
  18.  
  19. -- what colour would you like?
  20. col=Color3.fromRGB(0,255,255)
  21.  
  22. -- creation of gui
  23. local scrg=Instance.new("ScreenGui",Player.PlayerGui)
  24. local credit=Instance.new("TextLabel",scrg)
  25. credit.BackgroundColor3=Color3.fromRGB(255,255,255)
  26. credit.BackgroundTransparency=1
  27. credit.Position=UDim2.new(0,0,1,-18)
  28. credit.Size=UDim2.new(1,0,0,18)
  29. credit.Font=Enum.Font.Arial
  30. credit.FontSize=Enum.FontSize.Size18
  31. credit.Text="More SCRIPTS by adchand2 available at: http://pastebin.com/u/memesbruh03"
  32. credit.TextColor3=Color3.fromRGB(255,255,255)
  33. credit.TextScaled=true
  34. credit.TextStrokeTransparency=0.5
  35. credit.TextWrapped=true
  36. credit.TextXAlignment=Enum.TextXAlignment.Left
  37. local main=Instance.new("Frame",scrg)
  38. main.BackgroundColor3=Color3.fromRGB(0,0,0)
  39. main.BackgroundTransparency=0.5
  40. main.BorderColor3=col
  41. main.BorderSizePixel=5
  42. main.Position=UDim2.new(0,0,0.5,-100)
  43. main.Size=UDim2.new(0,300,0,90)
  44. main.Draggable=true
  45. local loopcol=Instance.new("Frame",main)
  46. loopcol.BackgroundTransparency=1
  47. loopcol.Size=UDim2.new(1,0,0.2,0)
  48. local ltitle=Instance.new("TextLabel",loopcol)
  49. ltitle.BackgroundColor3=Color3.fromRGB(255,255,255)
  50. ltitle.BackgroundTransparency=1
  51. ltitle.Size=UDim2.new(1,0,1,0)
  52. ltitle.Font=Enum.Font.Arial
  53. ltitle.FontSize=Enum.FontSize.Size18
  54. ltitle.Text="Looped"
  55. ltitle.TextColor3=col
  56. ltitle.TextXAlignment=Enum.TextXAlignment.Left
  57. local ltrue=Instance.new("TextButton",loopcol)
  58. ltrue.BackgroundColor3=Color3.fromRGB(0,0,0)
  59. ltrue.BackgroundTransparency=0.5
  60. ltrue.BorderSizePixel=0
  61. ltrue.Position=UDim2.new(0.5,0,0,0)
  62. ltrue.Size=UDim2.new(0.25,0,1,0)
  63. ltrue.Font=Enum.Font.Arial
  64. ltrue.FontSize=Enum.FontSize.Size18
  65. ltrue.Text="true"
  66. ltrue.TextColor3=Color3.fromRGB(255,255,255)
  67. local lfalse=Instance.new("TextButton",loopcol)
  68. lfalse.Name="TextButton2"
  69. lfalse.BackgroundColor3=Color3.fromRGB(0,0,0)
  70. lfalse.BackgroundTransparency=0.5
  71. lfalse.BorderSizePixel=0
  72. lfalse.Position=UDim2.new(0.75,0,0,0)
  73. lfalse.Size=UDim2.new(0.25,0,1,0)
  74. lfalse.Font=Enum.Font.Arial
  75. lfalse.FontSize=Enum.FontSize.Size18
  76. lfalse.Text="false"
  77. lfalse.TextColor3=Color3.fromRGB(255,255,255)
  78. local pscol=Instance.new("Frame",main)
  79. pscol.Name="Frame2"
  80. pscol.BackgroundTransparency=1
  81. pscol.Position=UDim2.new(0,0,0.2,0)
  82. pscol.Size=UDim2.new(1,0,0.2,0)
  83. local pstitle=Instance.new("TextLabel",pscol)
  84. pstitle.BackgroundTransparency=1
  85. pstitle.Size=UDim2.new(1,0,1,0)
  86. pstitle.Font=Enum.Font.Arial
  87. pstitle.FontSize=Enum.FontSize.Size18
  88. pstitle.Text="PlaybackSpeed"
  89. pstitle.TextColor3=col
  90. pstitle.TextXAlignment=Enum.TextXAlignment.Left
  91. local psfield=Instance.new("TextBox",pscol)
  92. psfield.BackgroundColor3=Color3.fromRGB(0,0,0)
  93. psfield.BackgroundTransparency=0.5
  94. psfield.BorderSizePixel=0
  95. psfield.Position=UDim2.new(0.5,0,0,0)
  96. psfield.Size=UDim2.new(0.5,0,1,0)
  97. psfield.Font=Enum.Font.Arial
  98. psfield.FontSize=Enum.FontSize.Size18
  99. psfield.Text="Input Here"
  100. psfield.TextColor3=Color3.fromRGB(255,255,255)
  101. local sidcol=Instance.new("Frame",main)
  102. sidcol.Name="Frame3"
  103. sidcol.BackgroundTransparency=1
  104. sidcol.Position=UDim2.new(0,0,0.4,0)
  105. sidcol.Size=UDim2.new(1,0,0.2,0)
  106. local sidtitle=Instance.new("TextLabel",sidcol)
  107. sidtitle.BackgroundColor3=Color3.fromRGB(255,255,255)
  108. sidtitle.BackgroundTransparency=1
  109. sidtitle.Size=UDim2.new(1,0,1,0)
  110. sidtitle.Font=Enum.Font.Arial
  111. sidtitle.FontSize=Enum.FontSize.Size18
  112. sidtitle.Text="SoundId"
  113. sidtitle.TextColor3=col
  114. sidtitle.TextXAlignment=Enum.TextXAlignment.Left
  115. local sidfield=Instance.new("TextBox",sidcol)
  116. sidfield.BackgroundColor3=Color3.fromRGB(0,0,0)
  117. sidfield.BackgroundTransparency=0.5
  118. sidfield.BorderSizePixel=0
  119. sidfield.Position=UDim2.new(0.5,0,0,0)
  120. sidfield.Size=UDim2.new(0.5,0,1,0)
  121. sidfield.Font=Enum.Font.Arial
  122. sidfield.FontSize=Enum.FontSize.Size18
  123. sidfield.Text="Input Here"
  124. sidfield.TextColor3=Color3.fromRGB(255,255,255)
  125. local volucol=Instance.new("Frame",main)
  126. volucol.Name="Frame4"
  127. volucol.BackgroundColor3=Color3.new(1,1,1)
  128. volucol.BackgroundTransparency=1
  129. volucol.Position=UDim2.new(0,0,0.6,0)
  130. volucol.Size=UDim2.new(1,0,0.2,0)
  131. local volutitle=Instance.new("TextLabel",volucol)
  132. volutitle.BackgroundColor3=Color3.fromRGB(255,255,255)
  133. volutitle.BackgroundTransparency=1
  134. volutitle.Size=UDim2.new(1,0,1,0)
  135. volutitle.Font=Enum.Font.Arial
  136. volutitle.FontSize=Enum.FontSize.Size18
  137. volutitle.Text="Volume"
  138. volutitle.TextColor3=col
  139. volutitle.TextXAlignment=Enum.TextXAlignment.Left
  140. local volufield= Instance.new("TextBox",volucol)
  141. volufield.BackgroundColor3=Color3.fromRGB(0,0,0)
  142. volufield.BackgroundTransparency=0.5
  143. volufield.BorderSizePixel=0
  144. volufield.Position=UDim2.new(0.5,0,0,0)
  145. volufield.Size=UDim2.new(0.5,0,1,0)
  146. volufield.Font=Enum.Font.Arial
  147. volufield.FontSize=Enum.FontSize.Size18
  148. volufield.Text="Input Here"
  149. volufield.TextColor3=Color3.fromRGB(255,255,255)
  150. local control=Instance.new("Frame",main)
  151. control.Name="Frame5"
  152. control.BackgroundColor3=Color3.fromRGB(255,255,255)
  153. control.BackgroundTransparency=1
  154. control.Position=UDim2.new(0,0,0.8,0)
  155. control.Size=UDim2.new(1,0,0.2,0)
  156. local pleh=Instance.new("TextButton",control)
  157. pleh.BackgroundColor3=Color3.fromRGB(0,0,0)
  158. pleh.BackgroundTransparency=0.5
  159. pleh.BorderSizePixel=0
  160. pleh.Size=UDim2.new(0.5,0,1,0)
  161. pleh.Font=Enum.Font.Arial
  162. pleh.FontSize=Enum.FontSize.Size18
  163. pleh.Text="Play Music"
  164. pleh.TextColor3=Color3.fromRGB(255,255,255)
  165. local stahp=Instance.new("TextButton",control)
  166. stahp.Name="TextButton2"
  167. stahp.BackgroundColor3=Color3.fromRGB(0,0,0)
  168. stahp.BackgroundTransparency=0.5
  169. stahp.BorderSizePixel=0
  170. stahp.Position=UDim2.new(0.5, 0, 0, 0)
  171. stahp.Size=UDim2.new(0.5, 0, 1, 0)
  172. stahp.Font=Enum.Font.Arial
  173. stahp.FontSize=Enum.FontSize.Size18
  174. stahp.Text="Stop Music"
  175. stahp.TextColor3=Color3.fromRGB(255,255,255)
  176. -- yay! creation is finished!
  177. -- but wait... ...there's more...
  178.  
  179. -- this is the fun part...
  180.  
  181. -- define looped variable
  182. looped=true
  183.  
  184. function create()
  185. local sound=Instance.new("Sound",workspace)
  186. sound.Name="MusicGUIsong"
  187. end
  188.  
  189. function del()
  190. if workspace.MusicGUIsong.IsPlaying==true then
  191. workspace.MusicGUIsong:Destroy()
  192. end
  193. end
  194.  
  195. function hinttext()
  196. local h=Instance.new("Hint",workspace)
  197. h.Name="MGUIText"
  198. end
  199.  
  200. ltrue.MouseButton1Click:connect(function()
  201. looped=true
  202. end)
  203. lfalse.MouseButton1Click:connect(function()
  204. looped=false
  205. end)
  206. pleh.MouseButton1Click:connect(function()
  207. create()
  208. workspace.MusicGUIsong.Looped=looped
  209. workspace.MusicGUIsong.PlaybackSpeed=psfield.Text
  210. workspace.MusicGUIsong.SoundId="rbxassetid://"..sidfield.Text
  211. workspace.MusicGUIsong.Volume=volufield.Text
  212. workspace.MusicGUIsong:Play()
  213. hinttext()
  214. workspace.MGUIText.Text="SoundId playing: "..sidfield.Text.." - PlaybackSpeed: "..psfield.Text.." - Volume: "..volufield.Text
  215. wait(2)
  216. workspace.MGUIText:Destroy()
  217. end)
  218. stahp.MouseButton1Click:connect(function()
  219. del()
  220. end)
  221.  
  222. print("adchand2's music player 1.1.0 is at the end!")
  223. print(_VERSION.." is cool!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement