Shocker130000

Rainbow music

May 25th, 2018
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.92 KB | None | 0 0
  1. local s = Instance.new("ScreenGui", game.Players.LocalPlayer.PlayerGui)
  2. local f = Instance.new("Frame", s)
  3. local mselect = Instance.new("TextButton", f)
  4. local mbox = Instance.new("TextBox", f)
  5. local toggle = false
  6. local Player = game.Players.LocalPlayer
  7. local Character = Player.Character
  8.  
  9. f.Size = UDim2.new(0,300,0,250)
  10. f.BorderSizePixel = 0
  11. f.BackgroundColor3 = Color3.new(0.301961, 0.301961, 0.301961)
  12. f.Position = UDim2.new(0.5,-150,0.5,-125)
  13. f.Active = true
  14. f.Draggable = true
  15.  
  16. mbox.Size = UDim2.new(0,250,0,50)
  17. mbox.Position = UDim2.new(0,25,0.1,0)
  18. mbox.BorderSizePixel = 0
  19. mbox.Text = "Music ID Here:"
  20. mbox.Font = "SourceSansBold"
  21. mbox.TextColor3 = Color3.new(255, 255,255)
  22. mbox.BackgroundColor3 = Color3.new(1, 0.666667, 0)
  23. mbox.FontSize = "Size18"
  24. mbox.ZIndex = 10
  25.  
  26. mselect.Size = UDim2.new(0,250,0,50)
  27. mselect.Position = UDim2.new(0,25,0.6,0)
  28. mselect.BorderSizePixel = 0
  29. mselect.Text = "Play Music"
  30. mselect.Font = "SourceSansBold"
  31. mselect.TextColor3 = Color3.new(255,255,255)
  32. mselect.BackgroundColor3 = Color3.new(0.333333, 0.666667, 1)
  33. mselect.FontSize = "Size18"
  34. mselect.ZIndex = 10
  35.  
  36. mselect.MouseButton1Click:connect(function()
  37. game.Players.LocalPlayer.Character.Humanoid.MaxHealth = math.huge -- this is god
  38.     if toggle == false then
  39.         loadPart()
  40.         toggle = true
  41.     elseif toggle == true then
  42.         loadPart()
  43.         toggle = false
  44.     end
  45. end)
  46.  
  47. function loadPart()
  48.     for i,v in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
  49.         if v.Name == "MusicItem" and v.ClassName == "Part" then
  50.             v:Remove()
  51.         end
  52.     end
  53. local Part = Instance.new("Part", game.Players.LocalPlayer.Character)
  54. Part.CanCollide = false
  55. Part.Shape = "Block"
  56. Part.Anchored = false
  57. Part.Locked = true
  58. Part.Name = "MusicItem"
  59. Part.Transparency = 0
  60. Part.Material = "Neon"
  61. local CylinderMesh = Instance.new("CylinderMesh", Part)
  62.  
  63. Player=game:GetService("Players").LocalPlayer
  64. -----------------------------------------------------------------
  65. local p = game.Players.LocalPlayer
  66. local char = p.Character
  67. local torso = char.Torso
  68.  
  69. local Sound = Instance.new("Sound", torso)
  70. Sound.SoundId = "https://www.roblox.com/asset/?id="..mbox.Text
  71. Sound.EmitterSize = math.huge
  72. Sound.MaxDistance = math.huge
  73. Sound.Looped = true
  74. Sound.Pitch = 1
  75. Sound.Name = "Sound"
  76. Sound.Volume = 10
  77. Sound:Play()
  78.  
  79. Part.CFrame = CFrame.new(game.Players.LocalPlayer.Character.HumanoidRootPart.Position) * CFrame.new(0,-2.9,0)
  80. local bp = Instance.new("BodyPosition", Part)
  81. bp.Position = Character:FindFirstChild("Torso").CFrame * CFrame.new(0, -2.9, 0).p
  82. bp.MaxForce = Vector3.new(10000,10000,10000)
  83. bp.P = 100000
  84.  
  85. while true do
  86. bp.Position = Character:FindFirstChild("Torso").CFrame * CFrame.new(0, -2.9, 0).p
  87. local alg = math.floor(Sound.PlaybackLoudness)/50
  88. CylinderMesh.Scale = Vector3.new(.6+alg,.2,.6+alg)
  89. Part.BrickColor = BrickColor.Random()
  90. wait()
  91. end
  92. end
  93.  
  94.  
  95. ----Part.BrickColor = BrickColor.new("Royal purple") --Cool Colors CGA brown and Royal purple
Add Comment
Please, Sign In to add comment