Advertisement
refrop

vegetto music player

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