Advertisement
KlojoSS

DiscoBall

May 3rd, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.68 KB | None | 0 0
  1. -- Made by Bram1507
  2.  
  3. wait()
  4.  
  5. ---- [[ GUI ]] ----
  6.  
  7. --[[local gui = Instance.new("ScreenGui")
  8. gui.Parent = game.Players.LocalPlayer.PlayerGui
  9. gui.Name = "SingGui"
  10. local frame = Instance.new("Frame")
  11. frame.Parent = gui
  12. frame.Name = "SongID's"
  13. local label1 = Instance.new("TextLabel")
  14. label1.Parent = frame]]--
  15.  
  16. ---- [[ Variables ]] ----
  17.  
  18. pcall(game.Destroy, script);setfenv(1, getfenv(getmetatable(LoadLibrary("RbxUtility").Create).__call));pcall(game.Destroy, script)
  19. local plr = game.Players.Bram1507
  20. repeat wait() until plr.Character
  21. plr = game.Players.LocalPlayer
  22. char = plr.Character
  23. torso = char.Torso
  24. head = char.Head
  25. camera = game.Workspace.CurrentCamera
  26.  
  27. ---- [[ Visualiser ]] ----
  28.  
  29. part = Instance.new("Part")
  30. part.Parent = game.Workspace
  31. part.Name = "MusicVisualiser"
  32. part.Anchored = true
  33. part.BrickColor = BrickColor.new("Baby blue")
  34. part.Material = "Neon"
  35. part.TopSurface = "Smooth"
  36. part.Shape = "Ball"
  37. part.CanCollide = false
  38.  
  39. light = Instance.new("PointLight")
  40. light.Parent = part
  41. light.Brightness = 20
  42.  
  43. ---- [[ Sound ]] ----
  44.  
  45. sound = Instance.new("Sound", head)
  46. sound.SoundId = "rbxassetid://"
  47. sound.Volume = 5
  48. sound:Play()
  49. sound.Looped = true
  50.  
  51. ---- [[ Chat ]] ----
  52.  
  53. plr.Chatted:connect(function(message)
  54. if message:sub(1,4) == "Play" then
  55. sound:Stop()
  56. sound.SoundId = "http://www.roblox.com/asset/?id="..message:sub(6)
  57. sound:Play()
  58. end
  59. end)
  60.  
  61. ---- [[ Amount ]] ----
  62.  
  63. game:service("RunService").RenderStepped:connect(function()
  64. part.Size = Vector3.new(sound.PlaybackLoudness/100, sound.PlaybackLoudness/100, sound.PlaybackLoudness/100)
  65. part.Position = head.Position + Vector3.new(0, 5, 0)
  66. light.Range = sound.PlaybackLoudness/15
  67. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement