local d=script:WaitForChild("\099\114\101\097\116\101\083\104\111\099\107\119\097\118\101")d.OnServerEvent:connect(function(d,M,b,f,t)local v=Instance.new("\080\097\114\116")v.BrickColor=t.shockwaveSettings.Color v.Material=Enum.Material.SmoothPlastic v.Name="\083\104\111\099\107\119\097\118\101"v.Anchored=true v.CanCollide=false v.FormFactor=Enum.FormFactor.Symmetric v.Size=V3(1,1,1)v.BottomSurface=Enum.SurfaceType.Smooth v.TopSurface=Enum.SurfaceType.Smooth local w=Instance.new("\083\112\101\099\105\097\108\077\101\115\104")w.MeshType=Enum.MeshType.Sphere w.Scale=V3()w.Parent=v v.Parent=f v.CFrame=CF(M)spawn(function()local d=tick()while true do local M=math.min((tick()-d)/t.shockwaveSettings.Duration,1)local f=(2*b)*M w.Scale=V3(f,f,f)v.Transparency=M if M==1 then break end wait()end v:Destroy()end)end)


local createShockwave = script:WaitForChild("createShockwave")
createShockwave.OnServerEvent:connect(function(_, Center, Radius, gunIgnore, S)
	local Shockwave = Instance.new("Part")
	Shockwave.BrickColor = S.shockwaveSettings.Color
	Shockwave.Material = Enum.Material.SmoothPlastic
	Shockwave.Name = "Shockwave"
	Shockwave.Anchored = true
	Shockwave.CanCollide = false
	Shockwave.FormFactor = Enum.FormFactor.Symmetric
	Shockwave.Size = V3(1, 1, 1)
	Shockwave.BottomSurface = Enum.SurfaceType.Smooth
	Shockwave.TopSurface = Enum.SurfaceType.Smooth
	local Mesh = Instance.new("SpecialMesh")
	Mesh.MeshType = Enum.MeshType.Sphere
	Mesh.Scale = V3()
	Mesh.Parent = Shockwave
	Shockwave.Parent = gunIgnore
	Shockwave.CFrame = CF(Center)
	spawn(function()
		local t0 = tick()
		while true do
			local Alpha = math.min((tick() - t0) / S.shockwaveSettings.Duration, 1)
			local Scale = 2 * Radius * Alpha
			Mesh.Scale = V3(Scale, Scale, Scale)
			Shockwave.Transparency = Alpha
			if Alpha == 1 then break end
			wait()
		end
		Shockwave:Destroy()
	end)
end)
