local p=script:WaitForChild("\099\114\101\097\116\101\066\108\111\111\100")p.OnServerEvent:connect(function(p,W,S,a,w,U)local X=CF(S,S+a)*CFANG(RAD(-90),0,0)local O=Instance.new("\080\097\114\116")O.Transparency=1 O.Anchored=true O.CanCollide=false O.FormFactor="\067\117\115\116\111\109"O.Size=V3(.2,1,.2)O.TopSurface=0 O.BottomSurface=0 local I=Instance.new("\080\097\114\116\105\099\108\101\069\109\105\116\116\101\114")I.Color=ColorSequence.new(U.bloodSettings.Color)I.LightEmission=0 I.Size=NumberSequence.new(U.bloodSettings.Size)I.Texture=U.bloodSettings.Texture I.Transparency=NumberSequence.new({NumberSequenceKeypoint.new(0,U.bloodSettings.startTransparency),NumberSequenceKeypoint.new(1,1)})I.EmissionDirection=Enum.NormalId.Top I.Lifetime=NumberRange.new(U.bloodSettings.Lifetime-.05,U.bloodSettings.Lifetime+.05)I.Rate=U.bloodSettings.Rate I.Rotation=NumberRange.new(0,90)I.Speed=NumberRange.new(U.bloodSettings.Speed)I.VelocitySpread=U.bloodSettings.Spread I.Parent=O O.Parent=w O.CFrame=X if not W.Anchored then local p=Instance.new("\087\101\108\100",O)p.Part0=W p.Part1=O p.C0=W.CFrame:toObjectSpace(X)O.Anchored=false end delay(.15,function()I.Enabled=false wait(U.bloodSettings.Lifetime+.05)O:Destroy()end)end)


local createBlood = script:WaitForChild("createBlood")
createBlood.OnServerEvent:connect(function(_, H, P, D, gunIgnore, S)
	local bloodCF = CF(P, P + D) * CFANG(RAD(-90), 0, 0)
	local Blood = Instance.new("Part")
	Blood.Transparency = 1
	Blood.Anchored = true
	Blood.CanCollide = false
	Blood.FormFactor = "Custom"
	Blood.Size = V3(0.2, 1, 0.2)
	Blood.TopSurface = 0
	Blood.BottomSurface = 0
	
	local Particles = Instance.new("ParticleEmitter")
	Particles.Color = ColorSequence.new(S.bloodSettings.Color)
	Particles.LightEmission = 0
	Particles.Size = NumberSequence.new(S.bloodSettings.Size)
	Particles.Texture = S.bloodSettings.Texture
	Particles.Transparency = NumberSequence.new(
		{
			NumberSequenceKeypoint.new(0, S.bloodSettings.startTransparency);
			NumberSequenceKeypoint.new(1, 1);
		}
	)
	Particles.EmissionDirection = Enum.NormalId.Top
	Particles.Lifetime = NumberRange.new(S.bloodSettings.Lifetime - 0.05, S.bloodSettings.Lifetime + 0.05)
	Particles.Rate = S.bloodSettings.Rate
	Particles.Rotation = NumberRange.new(0, 90)
	Particles.Speed = NumberRange.new(S.bloodSettings.Speed)
	Particles.VelocitySpread = S.bloodSettings.Spread
	Particles.Parent = Blood
	
	Blood.Parent = gunIgnore
	Blood.CFrame = bloodCF
	if (not H.Anchored) then
		local Weld = Instance.new("Weld", Blood)
		Weld.Part0 = H
		Weld.Part1 = Blood
		Weld.C0 = H.CFrame:toObjectSpace(bloodCF)
		Blood.Anchored = false
	end
	delay(0.15, function()
		Particles.Enabled = false
		wait(S.bloodSettings.Lifetime + 0.05)
		Blood:Destroy()
	end)
end)
