Advertisement
memesbruh03

Music Player GUI 1.3.1

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