Advertisement
Aeyao

wqersthdgpobiuy54mo9n5uthyitwhvihiuoerwnhviywhnei

Jul 20th, 2018
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.70 KB | None | 0 0
  1. local p = game.Players.LocalPlayer
  2. local c = p.Character
  3.  
  4. local music = Instance.new("Sound",c.Torso)
  5. music.Volume = 1
  6. music.EmitterSize = 999
  7. music.MaxDistance = 999
  8. music.SoundId = "rbxassetid://1320358407"
  9. music.Playing = false
  10.  
  11. local oldloudness = 1
  12.  
  13. p:GetMouse().KeyDown:connect(function(k)
  14. if k == "p" then
  15. music.Playing = not music.Playing
  16. if music.Playing == false then
  17. music.TimePosition = 0
  18. end
  19. end
  20. end)
  21.  
  22. function shockwave()
  23. local ball = Instance.new("Part")
  24. ball.Anchored = true
  25. ball.CanCollide = false
  26. ball.Color = Color3.fromRGB(255, 0 ,0 )
  27. ball.Parent = workspace
  28. ball.Transparency = .1
  29. ball.Material = "Glass"
  30. ball.Shape = "Ball"
  31. ball.Parent = c
  32. ball.CFrame = c.Torso.CFrame
  33. spawn(function()
  34. game.Debris:AddItem(ball,1)
  35. repeat
  36. local bcf = ball.CFrame
  37. ball.Size = ball.Size + Vector3.new(1.5,1.5,1.5)
  38. ball.CFrame = bcf
  39. ball.Transparency = ball.Transparency + .05
  40. game:GetService("RunService").RenderStepped:wait()
  41.  
  42. local region = Region3.new(bcf.p-Vector3.new(15,15,15),bcf.p+Vector3.new(15,15,15))
  43. local s = workspace:FindPartsInRegion3WithIgnoreList(region,{c})
  44. for i,v in next,s do
  45. if v.Anchored == false then
  46. if v.Parent:FindFirstChildOfClass("Humanoid") then
  47. else
  48. v:BreakJoints()
  49. end
  50. v.Velocity = CFrame.new(bcf.p,v.CFrame.p).lookVector*v:GetMass()*10
  51. end
  52. end
  53.  
  54. until ball.Transparency >= 1
  55. ball:Destroy()
  56. end)
  57. end
  58.  
  59. while game:GetService("RunService").RenderStepped:wait() do
  60. loudness = music.PlaybackLoudness/100
  61. if loudness > 6 then
  62.  
  63. if math.abs(loudness-oldloudness) > 2 then
  64. shockwave()
  65. print("OOF")
  66. end
  67. end
  68. oldloudness = loudness
  69. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement