Advertisement
refrop

vegetto music player 1.0 updated

Feb 22nd, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.88 KB | None | 0 0
  1. --[[ vegetto music player 1.0
  2.  
  3. vegetto music player version 1.0
  4.  
  5. ]]
  6.  
  7. --[[
  8.  
  9. what's new?
  10.  
  11. - 1.1.0
  12. · prints starting message
  13. · 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
  14. · clicking the play button now shows bgm info on top
  15. · main frame is now draggable (might not work but could be fixed soon)
  16.  
  17. - 1.2.0
  18. · now you can set the font for the music player itself
  19. · dragging the gui still doesn't work
  20. · new bgm info appears above character
  21.  
  22. - 1.3.0
  23. · bgm info appears above screen again
  24. · GUI now has sounds
  25. · default appearance changed
  26.  
  27. - 1.3.1
  28. · sounds work correctly
  29. · default appearance changed
  30. · I'm not actually gonna work on the draggable frame, as it's 2hard4me
  31.  
  32. - 1.4.0
  33. · users can now play audio from hash codes (i.e. 7b509300b5bed2c924d6a0bda990d33b)
  34. · not only that, but the music player itself is also larger
  35. · it's also pretty rare to find working songs like these.
  36. · you can now set the style of title when it disappears, but only when you save post this as a new paste
  37. · custom() now works properly
  38.  
  39. ]]
  40.  
  41. print("vegetto music player version 1.0")
  42.  
  43. -- define player variable
  44. local Player=game.Players.LocalPlayer
  45.  
  46. -- appearance
  47. col=Color3.fromRGB(255, 255, 0) -- blue color
  48. font=Enum.Font.SciFi
  49. style="Fade"
  50.  
  51. -- creation of gui
  52. local scrg=Instance.new("ScreenGui",Player.PlayerGui)
  53. local credit=Instance.new("TextLabel",scrg)
  54. credit.BackgroundColor3=Color3.fromRGB(255, 170, 0)
  55. credit.BackgroundTransparency=1
  56. credit.Position=UDim2.new(0,0,1,-18)
  57. credit.Size=UDim2.new(1,0,0,18)
  58. credit.Font=font
  59. credit.FontSize=Enum.FontSize.Size18
  60. credit.Text="Have a nice day :D"
  61. credit.TextColor3=Color3.fromRGB(255,255,255)
  62. credit.TextScaled=true
  63. credit.TextStrokeTransparency=0.5
  64. credit.TextWrapped=true
  65. credit.TextXAlignment=Enum.TextXAlignment.Left
  66. local title=Instance.new("TextLabel",scrg)
  67. title.BackgroundTransparency=1
  68. title.FontSize=Enum.FontSize.Size60
  69. title.Font=font
  70. title.Size=UDim2.new(1,0,0.25)
  71. title.TextColor3=col
  72. title.TextStrokeTransparency=0.5
  73. title.Text="adchand2's Music Player GUI v1.4.0"
  74. local main=Instance.new("Frame",scrg)
  75. main.BackgroundColor3=Color3.fromRGB(0,0,0)
  76. main.BackgroundTransparency=0.5
  77. main.BorderColor3=col
  78. main.BorderSizePixel=5
  79. main.Position=UDim2.new(0,0,0.5,-100)
  80. main.Size=UDim2.new(0,400,0,90)
  81. main.Selectable=true
  82. main.Draggable=true
  83. local loopcol=Instance.new("Frame",main)
  84. loopcol.BackgroundTransparency=1
  85. loopcol.Size=UDim2.new(1,0,0.2,0)
  86. local ltitle=Instance.new("TextLabel",loopcol)
  87. ltitle.BackgroundColor3=Color3.fromRGB(255,255,255)
  88. ltitle.BackgroundTransparency=1
  89. ltitle.Size=UDim2.new(1,0,1,0)
  90. ltitle.Font=font
  91. ltitle.FontSize=Enum.FontSize.Size18
  92. ltitle.Text="Looped"
  93. ltitle.TextColor3=col
  94. ltitle.TextXAlignment=Enum.TextXAlignment.Left
  95. ltitle.Active=false
  96. local ltrue=Instance.new("TextButton",loopcol)
  97. ltrue.BackgroundColor3=Color3.fromRGB(0,0,0)
  98. ltrue.BackgroundTransparency=0.5
  99. ltrue.BorderSizePixel=0
  100. ltrue.Position=UDim2.new(0.5,0,0,0)
  101. ltrue.Size=UDim2.new(0.25,0,1,0)
  102. ltrue.Font=font
  103. ltrue.FontSize=Enum.FontSize.Size18
  104. ltrue.Text="true"
  105. ltrue.TextColor3=Color3.fromRGB(255,255,255)
  106. local lfalse=Instance.new("TextButton",loopcol)
  107. lfalse.Name="TextButton2"
  108. lfalse.BackgroundColor3=Color3.fromRGB(0,0,0)
  109. lfalse.BackgroundTransparency=0.5
  110. lfalse.BorderSizePixel=0
  111. lfalse.Position=UDim2.new(0.75,0,0,0)
  112. lfalse.Size=UDim2.new(0.25,0,1,0)
  113. lfalse.Font=font
  114. lfalse.FontSize=Enum.FontSize.Size18
  115. lfalse.Text="false"
  116. lfalse.TextColor3=Color3.fromRGB(255,255,255)
  117. local pscol=Instance.new("Frame",main)
  118. pscol.Name="Frame2"
  119. pscol.BackgroundTransparency=1
  120. pscol.Position=UDim2.new(0,0,0.2,0)
  121. pscol.Size=UDim2.new(1,0,0.2,0)
  122. local pstitle=Instance.new("TextLabel",pscol)
  123. pstitle.BackgroundTransparency=1
  124. pstitle.Size=UDim2.new(1,0,1,0)
  125. pstitle.Font=font
  126. pstitle.FontSize=Enum.FontSize.Size18
  127. pstitle.Text="PlaybackSpeed"
  128. pstitle.TextColor3=col
  129. pstitle.TextXAlignment=Enum.TextXAlignment.Left
  130. pstitle.Active=false
  131. local psfield=Instance.new("TextBox",pscol)
  132. psfield.BackgroundColor3=Color3.fromRGB(0,0,0)
  133. psfield.BackgroundTransparency=0.5
  134. psfield.BorderSizePixel=0
  135. psfield.Position=UDim2.new(0.5,0,0,0)
  136. psfield.Size=UDim2.new(0.5,0,1,0)
  137. psfield.Font=font
  138. psfield.FontSize=Enum.FontSize.Size18
  139. psfield.Text="Input Here"
  140. psfield.TextColor3=Color3.fromRGB(255,255,255)
  141. psfield.TextScaled=true
  142. local sidcol=Instance.new("Frame",main)
  143. sidcol.Name="Frame3"
  144. sidcol.BackgroundTransparency=1
  145. sidcol.Position=UDim2.new(0,0,0.4,0)
  146. sidcol.Size=UDim2.new(1,0,0.2,0)
  147. local sidtitle=Instance.new("TextLabel",sidcol)
  148. sidtitle.BackgroundColor3=Color3.fromRGB(255,255,255)
  149. sidtitle.BackgroundTransparency=1
  150. sidtitle.Size=UDim2.new(1,0,1,0)
  151. sidtitle.Font=font
  152. sidtitle.FontSize=Enum.FontSize.Size18
  153. sidtitle.Text="SoundId"
  154. sidtitle.TextColor3=col
  155. sidtitle.TextXAlignment=Enum.TextXAlignment.Left
  156. sidtitle.Active=false
  157. local sidfield=Instance.new("TextBox",sidcol)
  158. sidfield.BackgroundColor3=Color3.fromRGB(0,0,0)
  159. sidfield.BackgroundTransparency=0.5
  160. sidfield.BorderSizePixel=0
  161. sidfield.Position=UDim2.new(0.5,0,0,0)
  162. sidfield.Size=UDim2.new(0.5,0,1,0)
  163. sidfield.Font=font
  164. sidfield.FontSize=Enum.FontSize.Size18
  165. sidfield.Text="Input Here"
  166. sidfield.TextColor3=Color3.fromRGB(255,255,255)
  167. sidfield.TextScaled=true
  168. local volucol=Instance.new("Frame",main)
  169. volucol.Name="Frame4"
  170. volucol.BackgroundColor3=Color3.new(1,1,1)
  171. volucol.BackgroundTransparency=1
  172. volucol.Position=UDim2.new(0,0,0.6,0)
  173. volucol.Size=UDim2.new(1,0,0.2,0)
  174. local volutitle=Instance.new("TextLabel",volucol)
  175. volutitle.BackgroundColor3=Color3.fromRGB(255,255,255)
  176. volutitle.BackgroundTransparency=1
  177. volutitle.Size=UDim2.new(1,0,1,0)
  178. volutitle.Font=font
  179. volutitle.FontSize=Enum.FontSize.Size18
  180. volutitle.Text="Volume"
  181. volutitle.TextColor3=col
  182. volutitle.TextXAlignment=Enum.TextXAlignment.Left
  183. volutitle.Active=false
  184. local volufield= Instance.new("TextBox",volucol)
  185. volufield.BackgroundColor3=Color3.fromRGB(0,0,0)
  186. volufield.BackgroundTransparency=0.5
  187. volufield.BorderSizePixel=0
  188. volufield.Position=UDim2.new(0.5,0,0,0)
  189. volufield.Size=UDim2.new(0.5,0,1,0)
  190. volufield.Font=font
  191. volufield.FontSize=Enum.FontSize.Size18
  192. volufield.Text="Input Here"
  193. volufield.TextColor3=Color3.fromRGB(255,255,255)
  194. volufield.TextScaled=true
  195. local control=Instance.new("Frame",main)
  196. control.Name="Frame5"
  197. control.BackgroundColor3=Color3.fromRGB(255,255,255)
  198. control.BackgroundTransparency=1
  199. control.Position=UDim2.new(0,0,0.8,0)
  200. control.Size=UDim2.new(1,0,0.2,0)
  201. local pleh1=Instance.new("TextButton",control)
  202. pleh1.BackgroundColor3=Color3.fromRGB(0,0,0)
  203. pleh1.BackgroundTransparency=0.5
  204. pleh1.BorderSizePixel=0
  205. pleh1.Size=UDim2.new(0.25,0,1,0)
  206. pleh1.Font=font
  207. pleh1.FontSize=Enum.FontSize.Size18
  208. pleh1.Text="Play Music"
  209. pleh1.TextColor3=Color3.fromRGB(255,255,255)
  210. local pleh2=Instance.new("TextButton",control)
  211. pleh2.BackgroundColor3=Color3.fromRGB(0,0,0)
  212. pleh2.BackgroundTransparency=0.5
  213. pleh2.BorderSizePixel=0
  214. pleh2.Position=UDim2.new(0.25,0,0,0)
  215. pleh2.Size=UDim2.new(0.25,0,1,0)
  216. pleh2.Font=font
  217. pleh2.FontSize=Enum.FontSize.Size18
  218. pleh2.Text="Play # Music"
  219. pleh2.TextColor3=Color3.fromRGB(255,255,255)
  220. local stahp=Instance.new("TextButton",control)
  221. stahp.Name="TextButton2"
  222. stahp.BackgroundColor3=Color3.fromRGB(0,0,0)
  223. stahp.BackgroundTransparency=0.5
  224. stahp.BorderSizePixel=0
  225. stahp.Position=UDim2.new(0.5, 0, 0, 0)
  226. stahp.Size=UDim2.new(0.5, 0, 1, 0)
  227. stahp.Font=font
  228. stahp.FontSize=Enum.FontSize.Size18
  229. stahp.Text="Stop Music"
  230. stahp.TextColor3=Color3.fromRGB(255,255,255)
  231. -- yay! creation is finished!
  232. -- but wait... ...there's more...
  233.  
  234.  
  235. -- this is the fun part...
  236.  
  237. -- define looped variable
  238. looped=true
  239.  
  240. function create()
  241. local sound=Instance.new("Sound",workspace)
  242. sound.Name="MusicGUIsong"
  243. end
  244.  
  245. function del()
  246. if workspace.MusicGUIsong.IsPlaying==true then
  247. workspace.MusicGUIsong:Destroy()
  248. end
  249. end
  250.  
  251. function informii()
  252. --[[local doublecheckplayer=game.Players.LocalPlayer.Name
  253. local wp=workspace:findFirstChild(doublecheckplayer)
  254. local hed=wp.Head
  255. local b=Instance.new("BillboardGui",hed)
  256. b.StudsOffset=Vector3.new(0,4,0)
  257. b.Size=UDim2.new(18,0,4,0)
  258. b.Adornee=hed
  259. local t=Instance.new("TextLabel",b)
  260. t.BackgroundTransparency=1
  261. t.TextColor3=col]]
  262. --t.Text=[[SoundId playing: ]]..sidfield.Text..[[
  263. --PlaybackSpeed: ]]..psfield.Text..[[
  264. --Volume: ]]..volufield.Text
  265. --[[t.Font=font
  266. t.Size=UDim2.new(1,0,1,0) -- keeping this here in case I want to use it again
  267. t.TextScaled=true
  268. wait(5)
  269. t:Destroy()]]
  270. local h=Instance.new("Hint",workspace)
  271. h.Text="SoundId playing: "..sidfield.Text.." - PlaybackSpeed: "..psfield.Text.." - Volume: "..volufield.Text
  272. wait(5)
  273. h:Destroy()
  274. end
  275.  
  276. function custom(texts) -- custom notification
  277. local wp=workspace:FindFirstChild(Player.Name)
  278. local hed=wp.Head
  279. local b=Instance.new("BillboardGui",hed)
  280. b.StudsOffset=Vector3.new(0,4,0)
  281. b.Size=UDim2.new(18,0,6,0)
  282. b.Adornee=hed
  283. local t=Instance.new("TextLabel",b)
  284. t.BackgroundTransparency=1
  285. t.TextColor3=col
  286. t.Text=texts
  287. t.Font=font
  288. t.Size=UDim2.new(1,0,1,0)
  289. t.TextScaled=true
  290. wait(5)
  291. repeat
  292. wait(0.05)
  293. t.TextTransparency=t.TextTransparency+0.1
  294. until
  295. t.TextTransparency==1
  296. t:Destroy()
  297. end
  298.  
  299. function makesound(id)
  300. local s=Instance.new("Sound",main)
  301. s.SoundId=id
  302. s.Volume=1
  303. s.PlaybackSpeed=1
  304. s:Play()
  305. end
  306.  
  307. ltrue.MouseButton1Click:connect(function()
  308. looped=true
  309. end)
  310. lfalse.MouseButton1Click:connect(function()
  311. looped=false
  312. end)
  313. pleh1.MouseButton1Click:connect(function()
  314. create()
  315. workspace.MusicGUIsong.Looped=looped
  316. workspace.MusicGUIsong.PlaybackSpeed=psfield.Text
  317. workspace.MusicGUIsong.SoundId="rbxassetid://"..sidfield.Text
  318. workspace.MusicGUIsong.Volume=volufield.Text
  319. workspace.MusicGUIsong:Play()
  320. informii()
  321. end)
  322. pleh2.MouseButton1Click:connect(function()
  323. create()
  324. workspace.MusicGUIsong.Looped=looped
  325. workspace.MusicGUIsong.PlaybackSpeed=psfield.Text
  326. workspace.MusicGUIsong.SoundId="http://www.roblox.com/asset/?hash="..sidfield.Text
  327. workspace.MusicGUIsong.Volume=volufield.Text
  328. workspace.MusicGUIsong:Play()
  329. informii()
  330. end)
  331. stahp.MouseButton1Click:connect(function()
  332. del()
  333. end)
  334.  
  335. -- sounds
  336.  
  337. ltrue.MouseButton1Click:connect(function()
  338. makesound("rbxassetid://156785206")
  339. end)
  340.  
  341. lfalse.MouseButton1Click:connect(function()
  342. makesound("rbxassetid://156785206")
  343. end)
  344.  
  345. psfield.SelectionGained:connect(function()
  346. makesound("rbxassetid://156785206")
  347. end)
  348.  
  349. psfield.Changed:connect(function()
  350. makesound("rbxassetid://215658476")
  351. end)
  352.  
  353. sidfield.SelectionGained:connect(function()
  354. makesound("rbxassetid://156785206")
  355. end)
  356.  
  357. sidfield.Changed:connect(function()
  358. makesound("rbxassetid://215658476")
  359. end)
  360.  
  361. volufield.SelectionGained:connect(function()
  362. makesound("rbxassetid://156785206")
  363. end)
  364.  
  365. volufield.Changed:connect(function()
  366. makesound("rbxassetid://215658476")
  367. end)
  368.  
  369. pleh1.MouseButton1Click:connect(function()
  370. makesound("rbxassetid://156785206")
  371. end)
  372.  
  373. pleh2.MouseButton1Click:connect(function()
  374. makesound("rbxassetid://156785206")
  375. end)
  376.  
  377. stahp.MouseButton1Click:connect(function()
  378. makesound("rbxassetid://156785206")
  379. end)
  380.  
  381. -- title fade after 3 seconds
  382.  
  383. wait(3)
  384. if style=="Fade" then
  385. repeat
  386. wait(0.05)
  387. title.TextTransparency=title.TextTransparency+0.01
  388. title.TextStrokeTransparency=title.TextStrokeTransparency+0.005
  389. until
  390. title.TextTransparency>=1 and title.TextStrokeTransparency>=1
  391. title:Destroy()
  392. elseif style=="Shrink" then
  393. repeat
  394. wait(0.05)
  395. title.TextSize=title.TextSize-1
  396. until
  397. title.TextSize==1
  398. title:Destroy()
  399. elseif style=="Hide" then
  400. title:TweenPosition(UDim2.new(0,0,-1,0),"In","Back",1)
  401. wait(1)
  402. title:Destroy()
  403. else
  404. print([[style "]]..style..[[" is invalid, returning "Fade"]])
  405. repeat
  406. wait(0.05)
  407. title.TextTransparency=title.TextTransparency+0.01
  408. title.TextStrokeTransparency=title.TextStrokeTransparency+0.005
  409. until
  410. title.TextTransparency>=1 and title.TextStrokeTransparency>=1
  411. title:Destroy()
  412. end
  413.  
  414. custom(":v ok")
  415. print(":V")
  416. print(_vegetto.." vegetto version!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement