Advertisement
PR0J3CT11

Untitled

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