Advertisement
metilol

Untitled

May 31st, 2018
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.71 KB | None | 0 0
  1. local char = game.Players.LocalPlayer.Character
  2. local s = Instance.new("ScreenGui", game.Workspace)
  3. local f = Instance.new("Frame", s)
  4. local mselect = Instance.new("TextButton", f)
  5. local mbox = Instance.new("TextBox", f)
  6. local toggle = false
  7. local Player = game.Players.LocalPlayer
  8. local Character = Player.Character
  9.  
  10. f.Size = UDim2.new(0,300,0,250)
  11. f.BorderSizePixel = 0
  12. f.BackgroundColor3 = Color3.new(0.301961, 0.301961, 0.301961)
  13. f.Position = UDim2.new(0.5,-150,0.5,-125)
  14. f.Active = true
  15. f.Draggable = true
  16.  
  17. mbox.Size = UDim2.new(0,250,0,50)
  18. mbox.Position = UDim2.new(0,25,0.1,0)
  19. mbox.BorderSizePixel = 0
  20. mbox.Text = "Music ID Here:"
  21. mbox.Font = "SourceSansBold"
  22. mbox.TextColor3 = Color3.new(255, 255,255)
  23. mbox.BackgroundColor3 = Color3.new(1, 0.666667, 0)
  24. mbox.FontSize = "Size18"
  25. mbox.ZIndex = 10
  26.  
  27. mselect.Size = UDim2.new(0,250,0,50)
  28. mselect.Position = UDim2.new(0,25,0.6,0)
  29. mselect.BorderSizePixel = 0
  30. mselect.Text = "Play Music"
  31. mselect.Font = "SourceSansBold"
  32. mselect.TextColor3 = Color3.new(255,255,255)
  33. mselect.BackgroundColor3 = Color3.new(0.333333, 0.666667, 1)
  34. mselect.FontSize = "Size18"
  35. mselect.ZIndex = 10
  36.  
  37. mselect.MouseButton1Click:connect(function()
  38. game.Players.LocalPlayer.Character.Humanoid.MaxHealth = math.huge -- this is god
  39. if toggle == false then
  40. loadPart()
  41. toggle = true
  42. elseif toggle == true then
  43. loadPart()
  44. toggle = false
  45. end
  46. end)
  47.  
  48. function loadPart()
  49. for i,v in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
  50. if v.Name == "MusicItem" and v.ClassName == "Part" then
  51. v:Remove()
  52. end
  53. end
  54.  
  55. local radio = Instance.new("Part", char)
  56. radio.Name = "Radio"
  57. local mesh = Instance.new("FileMesh", radio)
  58. mesh.MeshId = "http://www.roblox.com/asset/?id=212302951"
  59. mesh.TextureId = "http://www.roblox.com/asset/?id=212303049"
  60. mesh.Scale = Vector3.new(4, 4, 4)
  61. mesh.VertexColor = Vector3.new(1, 1, 1)
  62. mesh.Offset = Vector3.new(0, 0, 0)
  63.  
  64.  
  65. local function weldBetween(a, b)
  66. local weld = Instance.new("ManualWeld")
  67. weld.Part0 = a
  68. weld.Part1 = b
  69. weld.C0 = CFrame.new()
  70. weld.C1 = b.CFrame:inverse() * a.CFrame
  71. weld.Parent = a
  72. return weld;
  73. end
  74. local hand = radio:clone()
  75. hand.Parent=char
  76. hand.CFrame=char:WaitForChild("Torso").CFrame*CFrame.new(Vector3.new(0,0,0.9))*CFrame.Angles(0,math.rad(180),math.rad(45))
  77. weldBetween(char:WaitForChild("Torso"), hand)
  78. hand.CanCollide=true
  79. hand.Anchored=false
  80.  
  81. local Sound = Instance.new("Sound", Part)
  82. Sound.SoundId = "https://www.roblox.com/asset/?id="..mbox.Text
  83. Sound.EmitterSize = math.huge
  84. Sound.MaxDistance = math.huge
  85. Sound.Looped = true
  86. Sound.Pitch = 1
  87. Sound.Name = "Sound"
  88. Sound.Volume = 100
  89. Sound:Play()
  90. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement