Advertisement
Guest User

Untitled

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