Advertisement
memesbruh03

Music Player GUI 1.3.0

Oct 8th, 2016
523
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 9.23 KB | None | 0 0
  1. -- adchand2's music player 1.3.0
  2.  
  3. --[[
  4.  
  5.   what's new?
  6.  
  7. - 1.1.0
  8. · prints starting message
  9. · you can now choose what colour (cyan by default) you want it to be if you want to post this as a new script/paste
  10. · clicking the play button now shows bgm info on top
  11. · main frame is now draggable (might not work but could be fixed soon)
  12.  
  13. - 1.2.0
  14. · now you can set the font for the music player itself
  15. · dragging the gui still doesn't work
  16. · new bgm info appears above character
  17.  
  18. - 1.3.0
  19. · bgm info appears above screen again
  20. · GUI now has sounds
  21. · default appearance changed
  22.  
  23. ]]
  24.  
  25. print("Starting adchand2's music player 1.3.0...")
  26.  
  27. -- define player variable
  28. local Player=game.Players.LocalPlayer
  29.  
  30. -- appearance
  31. col=Color3.fromRGB(183,18,92)
  32. font=Enum.Font.Cartoon
  33.  
  34. -- creation of gui
  35. local scrg=Instance.new("ScreenGui",Player.PlayerGui)
  36. local credit=Instance.new("TextLabel",scrg)
  37. credit.BackgroundColor3=Color3.fromRGB(255,255,255)
  38. credit.BackgroundTransparency=1
  39. credit.Position=UDim2.new(0,0,1,-18)
  40. credit.Size=UDim2.new(1,0,0,18)
  41. credit.Font=font
  42. credit.FontSize=Enum.FontSize.Size18
  43. credit.Text="More SCRIPTS by adchand2 available at: http://pastebin.com/u/memesbruh03"
  44. credit.TextColor3=Color3.fromRGB(255,255,255)
  45. credit.TextScaled=true
  46. credit.TextStrokeTransparency=0.5
  47. credit.TextWrapped=true
  48. credit.TextXAlignment=Enum.TextXAlignment.Left
  49. local main=Instance.new("Frame",scrg)
  50. main.BackgroundColor3=Color3.fromRGB(0,0,0)
  51. main.BackgroundTransparency=0.5
  52. main.BorderColor3=col
  53. main.BorderSizePixel=5
  54. main.Position=UDim2.new(0,0,0.5,-100)
  55. main.Size=UDim2.new(0,300,0,90)
  56. main.Selectable=true
  57. main.Draggable=true
  58. local loopcol=Instance.new("Frame",main)
  59. loopcol.BackgroundTransparency=1
  60. loopcol.Size=UDim2.new(1,0,0.2,0)
  61. local ltitle=Instance.new("TextLabel",loopcol)
  62. ltitle.BackgroundColor3=Color3.fromRGB(255,255,255)
  63. ltitle.BackgroundTransparency=1
  64. ltitle.Size=UDim2.new(1,0,1,0)
  65. ltitle.Font=font
  66. ltitle.FontSize=Enum.FontSize.Size18
  67. ltitle.Text="Looped"
  68. ltitle.TextColor3=col
  69. ltitle.TextXAlignment=Enum.TextXAlignment.Left
  70. ltitle.Active=false
  71. local ltrue=Instance.new("TextButton",loopcol)
  72. ltrue.BackgroundColor3=Color3.fromRGB(0,0,0)
  73. ltrue.BackgroundTransparency=0.5
  74. ltrue.BorderSizePixel=0
  75. ltrue.Position=UDim2.new(0.5,0,0,0)
  76. ltrue.Size=UDim2.new(0.25,0,1,0)
  77. ltrue.Font=font
  78. ltrue.FontSize=Enum.FontSize.Size18
  79. ltrue.Text="true"
  80. ltrue.TextColor3=Color3.fromRGB(255,255,255)
  81. local lfalse=Instance.new("TextButton",loopcol)
  82. lfalse.Name="TextButton2"
  83. lfalse.BackgroundColor3=Color3.fromRGB(0,0,0)
  84. lfalse.BackgroundTransparency=0.5
  85. lfalse.BorderSizePixel=0
  86. lfalse.Position=UDim2.new(0.75,0,0,0)
  87. lfalse.Size=UDim2.new(0.25,0,1,0)
  88. lfalse.Font=font
  89. lfalse.FontSize=Enum.FontSize.Size18
  90. lfalse.Text="false"
  91. lfalse.TextColor3=Color3.fromRGB(255,255,255)
  92. local pscol=Instance.new("Frame",main)
  93. pscol.Name="Frame2"
  94. pscol.BackgroundTransparency=1
  95. pscol.Position=UDim2.new(0,0,0.2,0)
  96. pscol.Size=UDim2.new(1,0,0.2,0)
  97. local pstitle=Instance.new("TextLabel",pscol)
  98. pstitle.BackgroundTransparency=1
  99. pstitle.Size=UDim2.new(1,0,1,0)
  100. pstitle.Font=font
  101. pstitle.FontSize=Enum.FontSize.Size18
  102. pstitle.Text="PlaybackSpeed"
  103. pstitle.TextColor3=col
  104. pstitle.TextXAlignment=Enum.TextXAlignment.Left
  105. pstitle.Active=false
  106. local psfield=Instance.new("TextBox",pscol)
  107. psfield.BackgroundColor3=Color3.fromRGB(0,0,0)
  108. psfield.BackgroundTransparency=0.5
  109. psfield.BorderSizePixel=0
  110. psfield.Position=UDim2.new(0.5,0,0,0)
  111. psfield.Size=UDim2.new(0.5,0,1,0)
  112. psfield.Font=font
  113. psfield.FontSize=Enum.FontSize.Size18
  114. psfield.Text="Input Here"
  115. psfield.TextColor3=Color3.fromRGB(255,255,255)
  116. local sidcol=Instance.new("Frame",main)
  117. sidcol.Name="Frame3"
  118. sidcol.BackgroundTransparency=1
  119. sidcol.Position=UDim2.new(0,0,0.4,0)
  120. sidcol.Size=UDim2.new(1,0,0.2,0)
  121. local sidtitle=Instance.new("TextLabel",sidcol)
  122. sidtitle.BackgroundColor3=Color3.fromRGB(255,255,255)
  123. sidtitle.BackgroundTransparency=1
  124. sidtitle.Size=UDim2.new(1,0,1,0)
  125. sidtitle.Font=font
  126. sidtitle.FontSize=Enum.FontSize.Size18
  127. sidtitle.Text="SoundId"
  128. sidtitle.TextColor3=col
  129. sidtitle.TextXAlignment=Enum.TextXAlignment.Left
  130. sidtitle.Active=false
  131. local sidfield=Instance.new("TextBox",sidcol)
  132. sidfield.BackgroundColor3=Color3.fromRGB(0,0,0)
  133. sidfield.BackgroundTransparency=0.5
  134. sidfield.BorderSizePixel=0
  135. sidfield.Position=UDim2.new(0.5,0,0,0)
  136. sidfield.Size=UDim2.new(0.5,0,1,0)
  137. sidfield.Font=font
  138. sidfield.FontSize=Enum.FontSize.Size18
  139. sidfield.Text="Input Here"
  140. sidfield.TextColor3=Color3.fromRGB(255,255,255)
  141. local volucol=Instance.new("Frame",main)
  142. volucol.Name="Frame4"
  143. volucol.BackgroundColor3=Color3.new(1,1,1)
  144. volucol.BackgroundTransparency=1
  145. volucol.Position=UDim2.new(0,0,0.6,0)
  146. volucol.Size=UDim2.new(1,0,0.2,0)
  147. local volutitle=Instance.new("TextLabel",volucol)
  148. volutitle.BackgroundColor3=Color3.fromRGB(255,255,255)
  149. volutitle.BackgroundTransparency=1
  150. volutitle.Size=UDim2.new(1,0,1,0)
  151. volutitle.Font=font
  152. volutitle.FontSize=Enum.FontSize.Size18
  153. volutitle.Text="Volume"
  154. volutitle.TextColor3=col
  155. volutitle.TextXAlignment=Enum.TextXAlignment.Left
  156. volutitle.Active=false
  157. local volufield= Instance.new("TextBox",volucol)
  158. volufield.BackgroundColor3=Color3.fromRGB(0,0,0)
  159. volufield.BackgroundTransparency=0.5
  160. volufield.BorderSizePixel=0
  161. volufield.Position=UDim2.new(0.5,0,0,0)
  162. volufield.Size=UDim2.new(0.5,0,1,0)
  163. volufield.Font=font
  164. volufield.FontSize=Enum.FontSize.Size18
  165. volufield.Text="Input Here"
  166. volufield.TextColor3=Color3.fromRGB(255,255,255)
  167. local control=Instance.new("Frame",main)
  168. control.Name="Frame5"
  169. control.BackgroundColor3=Color3.fromRGB(255,255,255)
  170. control.BackgroundTransparency=1
  171. control.Position=UDim2.new(0,0,0.8,0)
  172. control.Size=UDim2.new(1,0,0.2,0)
  173. local pleh=Instance.new("TextButton",control)
  174. pleh.BackgroundColor3=Color3.fromRGB(0,0,0)
  175. pleh.BackgroundTransparency=0.5
  176. pleh.BorderSizePixel=0
  177. pleh.Size=UDim2.new(0.5,0,1,0)
  178. pleh.Font=font
  179. pleh.FontSize=Enum.FontSize.Size18
  180. pleh.Text="Play Music"
  181. pleh.TextColor3=Color3.fromRGB(255,255,255)
  182. local stahp=Instance.new("TextButton",control)
  183. stahp.Name="TextButton2"
  184. stahp.BackgroundColor3=Color3.fromRGB(0,0,0)
  185. stahp.BackgroundTransparency=0.5
  186. stahp.BorderSizePixel=0
  187. stahp.Position=UDim2.new(0.5, 0, 0, 0)
  188. stahp.Size=UDim2.new(0.5, 0, 1, 0)
  189. stahp.Font=font
  190. stahp.FontSize=Enum.FontSize.Size18
  191. stahp.Text="Stop Music"
  192. stahp.TextColor3=Color3.fromRGB(255,255,255)
  193. -- yay! creation is finished!
  194. -- but wait... ...there's more...
  195.  
  196. -- this is the fun part...
  197.  
  198. -- define looped variable
  199. looped=true
  200.  
  201. function create()
  202. local sound=Instance.new("Sound",workspace)
  203. sound.Name="MusicGUIsong"
  204. end
  205.  
  206. function del()
  207. if workspace.MusicGUIsong.IsPlaying==true then
  208. workspace.MusicGUIsong:Destroy()
  209. end
  210. end
  211.  
  212. function informii()
  213. --[[local doublecheckplayer=game.Players.LocalPlayer.Name
  214. local wp=workspace:findFirstChild(doublecheckplayer)
  215. local hed=wp.Head
  216. local b=Instance.new("BillboardGui",hed)
  217. b.StudsOffset=Vector3.new(0,4,0)
  218. b.Size=UDim2.new(18,0,4,0)
  219. b.Adornee=hed
  220. local t=Instance.new("TextLabel",b)
  221. t.BackgroundTransparency=1
  222. t.TextColor3=col]]
  223. --t.Text=[[SoundId playing: ]]..sidfield.Text..[[
  224. --PlaybackSpeed: ]]..psfield.Text..[[
  225. --Volume: ]]..volufield.Text
  226. --[[t.Font=font
  227. t.Size=UDim2.new(1,0,1,0)   -- keeping this here in case I want to use it again
  228. t.TextScaled=true
  229. wait(5)
  230. t:Destroy()]]
  231. local h=Instance.new("Hint",workspace)
  232. h.Text="SoundId playing: "..sidfield.Text.." - PlaybackSpeed: "..psfield.Text.." - Volume: "..volufield.Text
  233. wait(5)
  234. h:Destroy()
  235. end
  236.  
  237. function custom(texts) -- custom notification
  238. local wp=workspace:findFirstChild(Player)
  239. local hed=wp.Head
  240. local b=Instance.new("BillboardGui",hed)
  241. b.StudsOffset=Vector3.new(0,4,0)
  242. b.Size=UDim2.new(18,0,2,0)
  243. b.Adornee=hed
  244. local t=Instance.new("TextLabel",b)
  245. t.BackgroundTransparency=1
  246. t.TextColor3=col
  247. t.Text=texts
  248. t.Font=font
  249. t.Size=UDim2.new(1,0,1,0)
  250. wait(5)
  251. t:Destroy()
  252. end
  253.  
  254. function makesound(id)
  255. local s=Instance.new("Sound",main)
  256. s.SoundId=id
  257. s.Volume=1
  258. s.PlaybackSpeed=1
  259. s:Play()
  260. end
  261.  
  262. ltrue.MouseButton1Click:connect(function()
  263. looped=true
  264. end)
  265. lfalse.MouseButton1Click:connect(function()
  266. looped=false
  267. end)
  268. pleh.MouseButton1Click:connect(function()
  269. create()
  270. workspace.MusicGUIsong.Looped=looped
  271. workspace.MusicGUIsong.PlaybackSpeed=psfield.Text
  272. workspace.MusicGUIsong.SoundId="rbxassetid://"..sidfield.Text
  273. workspace.MusicGUIsong.Volume=volufield.Text
  274. workspace.MusicGUIsong:Play()
  275. informii()
  276. end)
  277. stahp.MouseButton1Click:connect(function()
  278. del()
  279. end)
  280.  
  281. -- sounds
  282.  
  283. ltrue.MouseButton1Click:connect(function()
  284. makesound("rbxassetid://156785206")
  285. end)
  286.  
  287. lfalse.MouseButton1Click:connect(function()
  288. makesound("rbxassetid://156785206")
  289. end)
  290.  
  291. psfield.Focused:connect(function()
  292. makesound("rbxassetid://156785206")
  293. end)
  294.  
  295. psfield.InputChanged:connect(function()
  296. makesound("rbxasset://sounds/switch.mp3")
  297. end)
  298.  
  299. sidfield.Focused:connect(function()
  300. makesound("rbxassetid://156785206")
  301. end)
  302.  
  303. sidfield.InputChanged:connect(function()
  304. makesound("rbxasset://sounds/switch.mp3")
  305. end)
  306.  
  307. volufield.Focused:connect(function()
  308. makesound("rbxassetid://156785206")
  309. end)
  310.  
  311. volufield.InputChanged:connect(function()
  312. makesound("rbxassetid://156785206")
  313. end)
  314.  
  315. custom("adchand2's music player 1.3.0 is now prepared")
  316. print("adchand2's music player 1.3.0 is at the end!")
  317. print(_VERSION.." is cool!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement