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

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)
