Advertisement
memesbruh03

Music Player GUI 1.0.0

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