Advertisement
Guest User

Untitled

a guest
Feb 26th, 2017
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.16 KB | None | 0 0
  1.  
  2. --Audio Vis
  3.  
  4. local RS = game:GetService("RunService")
  5. local players = game:GetService("Players")
  6. bet = "'"
  7. me = players.LocalPlayer
  8. char = me.Character
  9. torso = char.Torso
  10. lp = game.Players.LocalPlayer
  11. sound = Instance.new("Sound", game.Workspace:FindFirstChild(lp.Name).Head)
  12. sound.SoundId = "rbxassetid://537601228"
  13. box = Instance.new("Part", game.Workspace:FindFirstChild(lp.Name).Head)
  14. box.Anchored = true
  15. box.Size = Vector3.new(1, 0, 1)
  16. box.BrickColor = BrickColor.new("Toothpaste")
  17. box.Transparency = 0
  18. box.CanCollide = true
  19. box.TopSurface = "Smooth"
  20. box.BottomSurface = "Smooth"
  21. box.Material = "Neon"
  22. box.Name = "Box"
  23. sb = Instance.new("SelectionBox", game.Workspace:FindFirstChild(lp.Name).Head.Box)
  24. sb.Color3 = Color3.new(47/255, 21/255, 104/255)
  25. sb.SurfaceTransparency = 1
  26. sb.LineThickness = 0
  27. sb.Adornee = game.Workspace:FindFirstChild(lp.Name).Head.Box
  28. local direction = CFrame.new(box.Position, lp.Character['Left Leg'].Position).lookVector
  29. local increment = direction * 4
  30. local loop = RS.Stepped:connect(function()
  31. box.CFrame = box.CFrame:lerp(torso.CFrame * CFrame.new(3, 2.5, 0), .1)
  32. end)
  33.  
  34. lp.Chatted:connect(function(msg)
  35. if string.sub(msg, 1,3):lower() == "id"..bet then
  36. sound.SoundId = "rbxassetid://"..string.sub(msg,4)
  37. end
  38. end)
  39. lp.Chatted:connect(function(msg)
  40. if string.sub(msg, 1,5):lower() == "play"..bet then
  41. sound.Playing = true
  42. end
  43. end)
  44. lp.Chatted:connect(function(msg)
  45. if string.sub(msg, 1,5):lower() == "stop"..bet then
  46. sound.Playing = false
  47. end
  48. end)
  49. lp.Chatted:connect(function(msg)
  50. if string.sub(msg, 1,7):lower() == "volume"..bet then
  51. sound.Volume = string.sub(msg,8)
  52. end
  53. end)
  54.  
  55. while true do
  56. if sound.PlaybackLoudness <= 300 then
  57. box.Size = Vector3.new(sound.PlaybackLoudness / 76, sound.PlaybackLoudness / 76, sound.PlaybackLoudness / 76)
  58. end
  59. if sound.PlaybackLoudness >= 301 then
  60. box.Size = Vector3.new(sound.PlaybackLoudness / 230, sound.PlaybackLoudness / 230, sound.PlaybackLoudness / 230)
  61. end
  62. wait()
  63. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement