Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local p = game.Players.LocalPlayer
- local c = p.Character
- local music = Instance.new("Sound",c.Torso)
- music.Volume = 1
- music.EmitterSize = 999
- music.MaxDistance = 999
- music.SoundId = "rbxassetid://1320358407"
- music.Playing = false
- local oldloudness = 1
- p:GetMouse().KeyDown:connect(function(k)
- if k == "p" then
- music.Playing = not music.Playing
- if music.Playing == false then
- music.TimePosition = 0
- end
- end
- end)
- function shockwave()
- local ball = Instance.new("Part")
- ball.Anchored = true
- ball.CanCollide = false
- ball.Color = Color3.fromRGB(255, 0 ,0 )
- ball.Parent = workspace
- ball.Transparency = .1
- ball.Material = "Glass"
- ball.Shape = "Ball"
- ball.Parent = c
- ball.CFrame = c.Torso.CFrame
- spawn(function()
- game.Debris:AddItem(ball,1)
- repeat
- local bcf = ball.CFrame
- ball.Size = ball.Size + Vector3.new(1.5,1.5,1.5)
- ball.CFrame = bcf
- ball.Transparency = ball.Transparency + .05
- game:GetService("RunService").RenderStepped:wait()
- local region = Region3.new(bcf.p-Vector3.new(15,15,15),bcf.p+Vector3.new(15,15,15))
- local s = workspace:FindPartsInRegion3WithIgnoreList(region,{c})
- for i,v in next,s do
- if v.Anchored == false then
- if v.Parent:FindFirstChildOfClass("Humanoid") then
- else
- v:BreakJoints()
- end
- v.Velocity = CFrame.new(bcf.p,v.CFrame.p).lookVector*v:GetMass()*10
- end
- end
- until ball.Transparency >= 1
- ball:Destroy()
- end)
- end
- while game:GetService("RunService").RenderStepped:wait() do
- loudness = music.PlaybackLoudness/100
- if loudness > 6 then
- if math.abs(loudness-oldloudness) > 2 then
- shockwave()
- print("OOF")
- end
- end
- oldloudness = loudness
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement