Guest User

Untitled

a guest
Jul 10th, 2019
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local player = game.Players.LocalPlayer
  2. local character = player.Character
  3. local humanoid_root_part = character.HumanoidRootPart
  4. local market_place_service = game:GetService("MarketplaceService")
  5.  
  6. function create_weld(parent, part0, part1, c0, c1)
  7.     local weld = Instance.new("Weld", parent)
  8.     weld.Part0 = part0
  9.     weld.Part1 = part1
  10.     weld.C0 = c0
  11.     weld.C1 = c1
  12. end
  13.  
  14. local radio = Instance.new("Part", character)
  15. radio.Name = "Radio"
  16. radio.Size = Vector3.new(3.2, 1.6, 1.2)
  17. radio.CFrame = CFrame.new(humanoid_root_part.CFrame.X + (-0.101), humanoid_root_part.CFrame.Y + 0.23, humanoid_root_part.CFrame.Z + 0.801)
  18. create_weld(radio, radio, humanoid_root_part, radio.CFrame:inverse(), humanoid_root_part.CFrame:inverse())
  19. radio.Orientation = Vector3.new(0, 180, 0)
  20. local radio_mesh = Instance.new("SpecialMesh", radio)
  21. radio_mesh.MeshId = "rbxassetid://212302951"
  22. radio_mesh.MeshType = Enum.MeshType.FileMesh
  23. radio_mesh.Offset = Vector3.new(0, 0, 0)
  24. radio_mesh.Scale = Vector3.new(4, 4, 4)
  25. radio_mesh.TextureId = "rbxassetid://212303049"
  26. radio_mesh.VertexColor = Vector3.new(1, 1, 1)
  27. local sparkles = Instance.new("Sparkles", radio)
  28. sparkles.SparkleColor = Color3.fromRGB(255, 255, 0)
  29. local sound = Instance.new("Sound", radio)
  30. sound.Playing = true
  31. sound.Looped = true
  32.  
  33. local RadioGui = Instance.new("ScreenGui")
  34. local Frame = Instance.new("Frame")
  35. local Title = Instance.new("TextLabel")
  36. local PlayButton = Instance.new("TextButton")
  37. local PauseButton = Instance.new("TextButton")
  38. local StopButton = Instance.new("TextButton")
  39. local SoundID = Instance.new("TextBox")
  40.  
  41. RadioGui.Name = "RadioGui"
  42. RadioGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  43. RadioGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  44.  
  45. Frame.Parent = RadioGui
  46. Frame.BackgroundColor3 = Color3.new(1, 1, 1)
  47. Frame.BorderColor3 = Color3.new(0, 0, 0)
  48. Frame.BorderSizePixel = 0
  49. Frame.Position = UDim2.new(0.00642201817, 0, 0.61403507, 0)
  50. Frame.Size = UDim2.new(0.343119264, 0, 0.369005859, 0)
  51.  
  52. Title.Name = "Title"
  53. Title.Parent = Frame
  54. Title.BackgroundColor3 = Color3.new(1, 1, 1)
  55. Title.BackgroundTransparency = 1
  56. Title.BorderColor3 = Color3.new(0, 0, 0)
  57. Title.BorderSizePixel = 0
  58. Title.Selectable = true
  59. Title.Size = UDim2.new(1, 0, 0.205652446, 0)
  60. Title.Font = Enum.Font.SourceSans
  61. Title.Text = "Radio GUI"
  62. Title.TextColor3 = Color3.new(0, 0, 0)
  63. Title.TextScaled = true
  64. Title.TextSize = 14
  65. Title.TextWrapped = true
  66.  
  67. PlayButton.Name = "PlayButton"
  68. PlayButton.Parent = Frame
  69. PlayButton.BackgroundColor3 = Color3.new(0.333333, 1, 0)
  70. PlayButton.BorderColor3 = Color3.new(0, 0, 0)
  71. PlayButton.BorderSizePixel = 0
  72. PlayButton.Position = UDim2.new(0, 0, 0.734284222, 0)
  73. PlayButton.Size = UDim2.new(0.328342259, 0, 0.265715837, 0)
  74. PlayButton.Font = Enum.Font.SourceSans
  75. PlayButton.Text = "PLAY"
  76. PlayButton.TextColor3 = Color3.new(1, 1, 1)
  77. PlayButton.TextScaled = true
  78. PlayButton.TextSize = 14
  79. PlayButton.TextWrapped = true
  80.  
  81. PauseButton.Name = "PauseButton"
  82. PauseButton.Parent = Frame
  83. PauseButton.BackgroundColor3 = Color3.new(1, 0.666667, 0)
  84. PauseButton.BorderColor3 = Color3.new(0, 0, 0)
  85. PauseButton.BorderSizePixel = 0
  86. PauseButton.Position = UDim2.new(0.334224582, 0, 0.734284222, 0)
  87. PauseButton.Size = UDim2.new(0.328342259, 0, 0.265715837, 0)
  88. PauseButton.Font = Enum.Font.SourceSans
  89. PauseButton.Text = "PAUSE"
  90. PauseButton.TextColor3 = Color3.new(1, 1, 1)
  91. PauseButton.TextScaled = true
  92. PauseButton.TextSize = 14
  93. PauseButton.TextWrapped = true
  94.  
  95. StopButton.Name = "StopButton"
  96. StopButton.Parent = Frame
  97. StopButton.BackgroundColor3 = Color3.new(1, 0, 0)
  98. StopButton.BorderColor3 = Color3.new(0, 0, 0)
  99. StopButton.BorderSizePixel = 0
  100. StopButton.Position = UDim2.new(0.671122968, 0, 0.734284222, 0)
  101. StopButton.Size = UDim2.new(0.328342259, 0, 0.265715837, 0)
  102. StopButton.Font = Enum.Font.SourceSans
  103. StopButton.Text = "STOP"
  104. StopButton.TextColor3 = Color3.new(1, 1, 1)
  105. StopButton.TextScaled = true
  106. StopButton.TextSize = 14
  107. StopButton.TextWrapped = true
  108.  
  109. SoundID.Name = "SoundID"
  110. SoundID.Parent = Frame
  111. SoundID.BackgroundColor3 = Color3.new(0.333333, 0.666667, 1)
  112. SoundID.BorderColor3 = Color3.new(0, 0, 0)
  113. SoundID.BorderSizePixel = 3
  114. SoundID.Position = UDim2.new(0.213903725, 0, 0.364500791, 0)
  115. SoundID.Size = UDim2.new(0.566310227, 0, 0.269043893, 0)
  116. SoundID.Font = Enum.Font.SourceSans
  117. SoundID.PlaceholderColor3 = Color3.new(1, 1, 1)
  118. SoundID.PlaceholderText = "Sound ID"
  119. SoundID.Text = ""
  120. SoundID.TextColor3 = Color3.new(1, 1, 1)
  121. SoundID.TextScaled = true
  122. SoundID.TextSize = 14
  123. SoundID.TextWrapped = true
  124.  
  125. local radio_billboard_gui = Instance.new("BillboardGui", character.Head)
  126. radio_billboard_gui.Name = "RadioBillboardGUI"
  127. radio_billboard_gui.Adornee = character.Head
  128. radio_billboard_gui.AlwaysOnTop = true
  129. radio_billboard_gui.ExtentsOffsetWorldSpace = Vector3.new(0, 9, 0)
  130. radio_billboard_gui.Size = UDim2.new(8, 0, 6, 0)
  131. local radio_billboard_gui_textlabel = Instance.new("TextLabel", radio_billboard_gui)
  132. radio_billboard_gui_textlabel.BackgroundTransparency = 1
  133. radio_billboard_gui_textlabel.BorderColor3 = Color3.fromRGB(0, 0, 0)
  134. radio_billboard_gui_textlabel.BorderSizePixel = 0
  135. radio_billboard_gui_textlabel.Size = UDim2.new(1, 0, 1, 0)
  136. radio_billboard_gui_textlabel.Text = "Right now playing: "
  137. radio_billboard_gui_textlabel.TextColor3 = Color3.fromRGB(0, 0, 0)
  138. radio_billboard_gui_textlabel.TextSize = 18
  139. radio_billboard_gui_textlabel.TextWrapped = true
  140.  
  141. function zigzag(x)
  142.     return math.acos(math.cos(x * math.pi)) / math.pi
  143. end
  144.    
  145. PlayButton.MouseButton1Click:Connect(function()
  146.     if sound.IsPaused == true then
  147.         sound:Resume()
  148.     else
  149.         sound.SoundId = "rbxassetid://"..tonumber(SoundID.Text)
  150.         sound:Play()
  151.         local info = market_place_service:GetProductInfo(tonumber(SoundID.Text))
  152.         radio_billboard_gui_textlabel.Text = "Right now playing: "..info.Name
  153.     end
  154. end)
  155.    
  156. PauseButton.MouseButton1Click:Connect(function()
  157.     sound:Pause()
  158. end)
  159.  
  160. StopButton.MouseButton1Click:Connect(function()
  161.     sound:Stop()
  162. end)
  163.  
  164. local while_wait_do1 = coroutine.create(function()
  165.     local counter = 0
  166.     while wait(0.1) do
  167.         Frame.BackgroundColor3 = Color3.fromHSV(zigzag(counter), 1, 1)
  168.         counter = counter + 0.01
  169.     end
  170. end)
  171. coroutine.resume(while_wait_do1)
  172.  
  173. local while_wait_do2 = coroutine.create(function()
  174.     local counter = 0
  175.     while wait(0.1) do
  176.         radio_billboard_gui_textlabel.TextColor3 = Color3.fromHSV(zigzag(counter), 1, 1)
  177.         counter = counter + 0.01
  178.     end
  179. end)
  180. coroutine.resume(while_wait_do2)
  181.  
  182. local while_wait_do3 = coroutine.create(function()
  183.     while true do
  184.         wait(0.005)
  185.         radio_billboard_gui_textlabel.Rotation = radio_billboard_gui_textlabel.Rotation + 0.07
  186.     end
  187. end)
  188. coroutine.resume(while_wait_do3)
Advertisement
Add Comment
Please, Sign In to add comment