local e=Players.LocalPlayer local u=Workspace.Effects return function(e)local R=e.HumanoidRootPart local p=Ray.new(R.Position,Vector3.new(0,-50,0))local j,q,G=Workspace:FindPartOnRayWithIgnoreList(p,{e;u})if j then for e,u in pairs(e:GetDescendants())do if u:IsA("\066\097\115\101\080\097\114\116")then u.Transparency=1 elseif u:IsA("\068\101\099\097\108")then u.Transparency=1 end end local R=math.rad(math.random(360))local p=script.Gravestone:Clone()p.Dirt.CFrame=(CFrame.new(q,q+G)*CFrame.Angles(-math.pi/2,0,0))*CFrame.Angles(0,R,0)p.Stone.CFrame=((CFrame.new(q,q+G)*CFrame.Angles(-math.pi/2,0,0))*CFrame.new(0,p.Stone.Size.Y/2,0))*CFrame.Angles(0,R,0)p.Parent=u p.Dirt.DirtEmitter:Emit(10)p.Dirt.ImpactEmitter:Emit(10)end end


local PLAYER	= Players.LocalPlayer
local EFFECTS	= Workspace.Effects

return function(character)
	local rootPart	= character.HumanoidRootPart
	
	local ray		= Ray.new(rootPart.Position, Vector3.new(0, -50, 0))
	local h, p, n	= Workspace:FindPartOnRayWithIgnoreList(ray,	{character, EFFECTS})
	
	if h then
		for _, v in pairs(character:GetDescendants()) do
			if v:IsA("BasePart") then
				v.Transparency	= 1
			elseif v:IsA("Decal") then
				v.Transparency	= 1
			end
		end
		
		local angle	= math.rad(math.random(360))
		
		local gravestone	= script.Gravestone:Clone()
			gravestone.Dirt.CFrame	= CFrame.new(p, p + n) * CFrame.Angles(-math.pi/2, 0, 0) * CFrame.Angles(0, angle, 0)
			gravestone.Stone.CFrame	= CFrame.new(p, p + n) * CFrame.Angles(-math.pi/2, 0, 0) * CFrame.new(0, gravestone.Stone.Size.Y/2, 0) * CFrame.Angles(0, angle, 0)
			gravestone.Parent	= EFFECTS
			
		gravestone.Dirt.DirtEmitter:Emit(10)
		gravestone.Dirt.ImpactEmitter:Emit(10)
	end
end
