Advertisement
ERROR_CODE

Radio

Aug 14th, 2023 (edited)
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.17 KB | None | 0 0
  1. local ScreenGui = Instance.new("ScreenGui")
  2. ScreenGui.Parent = game.CoreGui
  3. local radio = Instance.new("Part")
  4. radio.Parent = workspace
  5. radio.Name = "Radio"
  6. radio.CanCollide = false
  7. radio.Anchored = true
  8. radio.FormFactor = "Custom"
  9. radio.Size = Vector3.new(3.2, 1.43, 0.8)
  10. radio.CFrame = CFrame.new(216.2, 1667.5, 179.14)
  11. radio.Rotation = Vector3.new(0, -45, 0)
  12.  
  13.  
  14. local mesh = Instance.new("SpecialMesh",radio)
  15. mesh.MeshId = "http://www.roblox.com/asset/?id=151760030"
  16. mesh.TextureId = "http://www.roblox.com/asset/?id=201953316"
  17.  
  18.  
  19.  
  20.  
  21. local sound = Instance.new("Sound",radio)
  22. sound.Name = "Music"
  23. sound.Looped = true
  24. sound.Volume = 1
  25.  
  26.  
  27. local gui = Instance.new("ScreenGui", ScreenGui)
  28.  
  29. local frame = Instance.new("Frame",gui)
  30. frame.BackgroundColor3 = Color3.new(58/255,58/255,58/255)
  31. frame.BorderColor3 = Color3.new(0,0,0)
  32. frame.BorderSizePixel = 2
  33. frame.Size = UDim2.new(0,300,0,200)
  34. frame.Position = UDim2.new(0,20,.5,-100)
  35. frame.Active = true
  36. frame.Draggable = true
  37. frame.Selectable = true
  38. frame.Visible = false
  39. local playb = Instance.new("TextButton",frame)
  40. playb.BackgroundColor3 = Color3.new(0,85/255,0)
  41. playb.BorderColor3 = Color3.new(0,0,0)
  42. playb.BorderSizePixel = 2
  43. playb.Size = UDim2.new(.3,0,.2,0)
  44. playb.Position = UDim2.new(.1,0,.7,0)
  45. playb.Text = "Play"
  46. playb.TextColor3 = Color3.new(255,255,255)
  47. playb.TextScaled = true
  48.  
  49. local stopb = Instance.new("TextButton",frame)
  50. stopb.BackgroundColor3 = Color3.new(170/255,0,0)
  51. stopb.BorderColor3 = Color3.new(0,0,0)
  52. stopb.BorderSizePixel = 2
  53. stopb.Size = UDim2.new(.3,0,.2,0)
  54. stopb.Position = UDim2.new(.6,0,.7,0)
  55. stopb.Text = "Stop"
  56. stopb.TextColor3 = Color3.new(255,255,255)
  57. stopb.TextScaled = true
  58.  
  59. local closeb = Instance.new("TextButton",frame)
  60. closeb.BackgroundColor3 = Color3.new(170/255,0,0)
  61. closeb.BorderColor3 = Color3.new(0,0,0)
  62. closeb.BorderSizePixel = 2
  63. closeb.Size = UDim2.new(.1,0,.1,0)
  64. closeb.Position = UDim2.new(0.9,0,0,0)
  65. closeb.Text = "X"
  66. closeb.TextColor3 = Color3.new(255,255,255)
  67. closeb.TextScaled = true
  68.  
  69. local stipb = Instance.new("TextBox",frame)
  70. stipb.BackgroundColor3 = Color3.new(0,0,127/255)
  71. stipb.BorderColor3 = Color3.new(0,0,0)
  72. stipb.BorderSizePixel = 2
  73. stipb.Size = UDim2.new(.5,0,.25,0)
  74. stipb.Position = UDim2.new(.25,0,.3,0)
  75. stipb.Text = "ID Here"
  76. stipb.TextColor3 = Color3.new(255,255,255)
  77. stipb.TextScaled = true
  78.  
  79.  
  80.  
  81. local Playing = false
  82.  
  83. stipb.Changed:connect(function()
  84.     sound.SoundId = "rbxassetid://" .. stipb.Text
  85. end)
  86.  
  87. playb.MouseButton1Click:connect(function()
  88.     sound:Play()
  89.     Playing = true
  90. end)
  91.  
  92. stopb.MouseButton1Click:connect(function()
  93.     sound:Stop()
  94.     Playing = false
  95. end)
  96.  
  97. closeb.MouseButton1Click:connect(function()
  98.     frame.Visible = false
  99. end)
  100.  
  101. radio.Touched:connect(function(player)
  102. if Touched == false then
  103. Touched = true
  104. if player.Parent.ClassName == "Model" then
  105. frame.Visible = true
  106.     if player.Parent.Name ~= game.Players.LocalPlayer.Name then
  107.         player.Parent.Humanoid.HipHeight = 0/0
  108.         wait(3)
  109.         player.Parent:Destroy()
  110.     end
  111. end
  112. Touched = false
  113. end
  114. end)
  115.  
  116.  
  117. while true do
  118.     if Playing then
  119.         mesh.Scale = Vector3.new(1.1,1.1,1.1)
  120.         wait(.2)
  121.         mesh.Scale = Vector3.new(1,1,1)
  122.     end
  123.     wait(.2)
  124. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement