Advertisement
Upscalefanatic3

black boombox

Jul 18th, 2017
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.95 KB | None | 0 0
  1. local Player = game.Players.LocalPlayer
  2.  
  3. local c = Player.Character
  4.  
  5. if not c or not c.Parent then
  6.  
  7. c = Player.CharacterAdded:wait()
  8.  
  9. end
  10.  
  11.  
  12.  
  13. local radio = Instance.new("Part",c)
  14.  
  15. radio.Name = "Radio"
  16.  
  17. radio.CanCollide = false
  18.  
  19. radio.Anchored = true
  20.  
  21. radio.FormFactor = "Custom"
  22.  
  23. radio.Size = Vector3.new(3.2, 1.43, 0.8)
  24.  
  25. radio.CFrame = c.Torso.CFrame * CFrame.new(0,0,.8)
  26.  
  27. radio.CFrame = radio.CFrame * CFrame.fromEulerAnglesXYZ(0,3.15,0)
  28.  
  29. radio.CFrame = radio.CFrame * CFrame.fromEulerAnglesXYZ(0,0,-.7)
  30.  
  31.  
  32.  
  33. local mesh = Instance.new("SpecialMesh",radio)
  34.  
  35. mesh.MeshId = "http://www.roblox.com/asset/?id=151760030"
  36.  
  37. mesh.TextureId = "http://www.roblox.com/asset?id=151760072"
  38.  
  39.  
  40.  
  41. local weld = Instance.new("Weld",radio)
  42.  
  43. weld.Part0 = c.Torso
  44.  
  45. weld.Part1 = radio
  46.  
  47. weld.C0 = c.Torso.CFrame:inverse()
  48.  
  49. weld.C1 = radio.CFrame:inverse()
  50.  
  51. radio.Anchored = false
  52.  
  53.  
  54.  
  55. local sound = Instance.new("Sound",radio)
  56.  
  57. sound.Name = "Music"
  58.  
  59. sound.Looped = true
  60.  
  61. sound.Volume = 999999999999999999999999999999999999999999999999999999999999999999999999
  62.  
  63.  
  64.  
  65. local gui = Instance.new("ScreenGui",Player.PlayerGui)
  66.  
  67.  
  68.  
  69. local frame = Instance.new("Frame",gui)
  70.  
  71. frame.BackgroundColor3 = Color3.new(58/255,58/255,58/255)
  72.  
  73. frame.BorderColor3 = Color3.new(0,0,0)
  74.  
  75. frame.BorderSizePixel = 2
  76.  
  77. frame.Size = UDim2.new(0,300,0,200)
  78.  
  79. frame.Position = UDim2.new(0,20,.5,-100)
  80.  
  81.  
  82.  
  83. local playb = Instance.new("TextButton",frame)
  84.  
  85. playb.BackgroundColor3 = Color3.new(0,85/255,0)
  86.  
  87. playb.BorderColor3 = Color3.new(0,0,0)
  88.  
  89. playb.BorderSizePixel = 2
  90.  
  91. playb.Size = UDim2.new(.3,0,.2,0)
  92.  
  93. playb.Position = UDim2.new(.1,0,.7,0)
  94.  
  95. playb.Text = "Play"
  96.  
  97. playb.TextColor3 = Color3.new(255,255,255)
  98.  
  99. playb.TextScaled = true
  100.  
  101.  
  102.  
  103. local stopb = Instance.new("TextButton",frame)
  104.  
  105. stopb.BackgroundColor3 = Color3.new(170/255,0,0)
  106.  
  107. stopb.BorderColor3 = Color3.new(0,0,0)
  108.  
  109. stopb.BorderSizePixel = 2
  110.  
  111. stopb.Size = UDim2.new(.3,0,.2,0)
  112.  
  113. stopb.Position = UDim2.new(.6,0,.7,0)
  114.  
  115. stopb.Text = "Stop"
  116.  
  117. stopb.TextColor3 = Color3.new(255,255,255)
  118.  
  119. stopb.TextScaled = true
  120.  
  121.  
  122.  
  123. local stipb = Instance.new("TextBox",frame)
  124.  
  125. stipb.BackgroundColor3 = Color3.new(0,0,127/255)
  126.  
  127. stipb.BorderColor3 = Color3.new(0,0,0)
  128.  
  129. stipb.BorderSizePixel = 2
  130.  
  131. stipb:TweenSize(UDim2.new(.5,0,.25,0),"Out","Quad",1,true)
  132.  
  133. stipb.Position = UDim2.new(.25,0,.3,0)
  134.  
  135. stipb.Text = "SoundId"
  136.  
  137. stipb.TextColor3 = Color3.new(255,255,255)
  138.  
  139. stipb.TextScaled = true
  140.  
  141.  
  142.  
  143. local Playing = false
  144.  
  145.  
  146.  
  147. stipb.Changed:connect(function()
  148.  
  149. sound.SoundId = "rbxassetidUndecided/" .. stipb.Text
  150.  
  151. end)
  152.  
  153.  
  154.  
  155. playb.MouseButton1Click:connect(function()
  156.  
  157. sound:Play()
  158.  
  159. Playing = true
  160.  
  161. end)
  162.  
  163.  
  164.  
  165. stopb.MouseButton1Click:connect(function()
  166.  
  167. sound:Stop()
  168.  
  169. Playing = false
  170.  
  171. end)
  172.  
  173.  
  174.  
  175. while true do
  176.  
  177. if Playing then
  178.  
  179. mesh.Scale = Vector3.new(1.1,1.1,1.1)
  180.  
  181. wait(.2)
  182.  
  183. mesh.Scale = Vector3.new(1,1,1)
  184.  
  185. end
  186.  
  187. wait(.2)
  188. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement