Advertisement
naser2345

radio

Aug 9th, 2016
49,521
1
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.95 KB | None | 1 0
  1.  
  2. --Script Builder Radio!
  3.  
  4. local Player = game.Players.LocalPlayer
  5. local c = Player.Character
  6. if not c or not c.Parent then
  7. c = Player.CharacterAdded:wait()
  8. end
  9.  
  10. wait(1)
  11.  
  12. local radio = Instance.new("Part",c)
  13. radio.Name = "Radio"
  14. radio.CanCollide = false
  15. radio.Anchored = true
  16. radio.FormFactor = "Custom"
  17. radio.Size = Vector3.new(3.2, 1.43, 0.8)
  18. radio.CFrame = c.Torso.CFrame * CFrame.new(0,0,.8)
  19. radio.CFrame = radio.CFrame * CFrame.fromEulerAnglesXYZ(0,3.15,0)
  20. radio.CFrame = radio.CFrame * CFrame.fromEulerAnglesXYZ(0,0,-.7)
  21.  
  22. local mesh = Instance.new("SpecialMesh",radio)
  23. mesh.MeshId = "http://www.roblox.com/asset/?id=151760030"
  24. mesh.TextureId = "https://www.roblox.com/Sweg-item?id=156708131"
  25.  
  26. local weld = Instance.new("Weld",radio)
  27. weld.Part0 = c.Torso
  28. weld.Part1 = radio
  29. weld.C0 = c.Torso.CFrame:inverse()
  30. weld.C1 = radio.CFrame:inverse()
  31. radio.Anchored = false
  32.  
  33. local sound = Instance.new("Sound",radio)
  34. sound.Name = "Music"
  35. sound.Looped = true
  36. sound.Volume = 1
  37.  
  38. local gui = Instance.new("ScreenGui",Player.PlayerGui)
  39.  
  40. local frame = Instance.new("Frame",gui)
  41. frame.BackgroundColor3 = Color3.new(58/255,58/255,58/255)
  42. frame.BorderColor3 = Color3.new(0,0,0)
  43. frame.BorderSizePixel = 2
  44. frame.Size = UDim2.new(0,300,0,200)
  45. frame.Position = UDim2.new(0,20,.5,-100)
  46.  
  47. local playb = Instance.new("TextButton",frame)
  48. playb.BackgroundColor3 = Color3.new(0,85/255,0)
  49. playb.BorderColor3 = Color3.new(0,0,0)
  50. playb.BorderSizePixel = 2
  51. playb.Size = UDim2.new(.3,0,.2,0)
  52. playb.Position = UDim2.new(.1,0,.7,0)
  53. playb.Text = "Play"
  54. playb.TextColor3 = Color3.new(255,255,255)
  55. playb.TextScaled = true
  56.  
  57. local stopb = Instance.new("TextButton",frame)
  58. stopb.BackgroundColor3 = Color3.new(170/255,0,0)
  59. stopb.BorderColor3 = Color3.new(0,0,0)
  60. stopb.BorderSizePixel = 2
  61. stopb.Size = UDim2.new(.3,0,.2,0)
  62. stopb.Position = UDim2.new(.6,0,.7,0)
  63. stopb.Text = "Stop"
  64. stopb.TextColor3 = Color3.new(255,255,255)
  65. stopb.TextScaled = true
  66.  
  67. local stipb = Instance.new("TextBox",frame)
  68. stipb.BackgroundColor3 = Color3.new(0,0,127/255)
  69. stipb.BorderColor3 = Color3.new(0,0,0)
  70. stipb.BorderSizePixel = 2
  71. stipb:TweenSize(UDim2.new(.5,0,.25,0),"Out","Quad",1,true)
  72. stipb.Position = UDim2.new(.25,0,.3,0)
  73. stipb.Text = "SoundId"
  74. stipb.TextColor3 = Color3.new(255,255,255)
  75. stipb.TextScaled = true
  76.  
  77. local label = Instance.new("TextLabel",frame)
  78. label.Text = "Made By naser2018!"
  79. label.TextScaled = true
  80. label:TweenSize(UDim2.new(1,0,.2,0))
  81. label.TextColor3 = Color3.new(255,255,255)
  82. label.BackgroundTransparency = 1
  83. --stipb.Size = UDim2.new(1,0,.2,0)
  84.  
  85. local Playing = false
  86.  
  87. stipb.Changed:connect(function()
  88. sound.SoundId = "rbxassetid://" .. stipb.Text
  89. end)
  90.  
  91. playb.MouseButton1Click:connect(function()
  92. sound:Play()
  93. Playing = true
  94. end)
  95.  
  96. stopb.MouseButton1Click:connect(function()
  97. sound:Stop()
  98. Playing = false
  99. end)
  100.  
  101. while true do
  102. if Playing then
  103. mesh.Scale = Vector3.new(1.1,1.1,1.1)
  104. wait(.2)
  105. mesh.Scale = Vector3.new(1,1,1)
  106. end
  107. wait(.2)
  108. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement