local G=Instance.new("\070\111\108\100\101\114",game.Workspace)G.Name="\066\108\111\111\100\046\083\112\108\097\116\116\101\114\046\080\097\114\116\105\099\108\101\115"function create_blood_splatter(z)local o={"\076\101\102\116 \076\101\103";"\082\105\103\104\116 \076\101\103";"\084\111\114\115\111","\082\105\103\104\116 \065\114\109";"\076\101\102\116 \065\114\109";"\072\101\097\100"}local a if z.humanoid.Health<=0 then repeat wait()a=o[math.random(1,#o)]until z.character:FindFirstChild(a)a=z.character[a]local G=script.Blood:Clone()G.Parent=a G.Enabled=true else a=z.torso end local C=Ray.new(a.Position,Vector3.new(0,-100,0))local E,c=game.Workspace:FindPartOnRayWithIgnoreList(C,{G,unpack(z.character:GetChildren())},true)if E then local z=Instance.new("\080\097\114\116",G)z.Anchored=true z.CanCollide=false z.Transparency=1 z.Name="\080\097\114\116\105\099\108\101\095\066\108\111\111\100"z.FormFactor=Enum.FormFactor.Custom z.Size=Vector3.new(.01,.1,.01)z.CFrame=CFrame.new(c)local o=Instance.new("\068\101\099\097\108",z)o.Transparency=1 o.Texture="\104\116\116\112\058\047\047\119\119\119\046\114\111\098\108\111\120\046\099\111\109\047\097\115\115\101\116\047\063\105\100\061"..blood_textures[math.random(1,#blood_textures)]o.Face="\084\111\112"game.Debris:AddItem(z,settings.remove_time+20)local a=coroutine.wrap(function()local G=z.Size local a=o.Transparency local C=math.random(settings.max_transparency*100,settings.min_transparency*100)/100 local E=Vector3.new(math.random(settings.min_size_x*100,settings.max_size_x*100)/100,z.Size.Y,math.random(settings.min_size_z*100,settings.max_size_z*100)/100)local c=math.random(settings.tran_tw_time_min*100,settings.tran_tw_time_max*100)/100 local j=math.random(settings.size_tw_time_min*100,settings.size_tw_time_max*100)/100 for G=1,10*c,1 do wait()local z=G/(10*c)o.Transparency=a-z*C end for o=1,10*j,1 do wait()local a=o/(10*j)z.Size=Vector3.new(G.X+a*E.X,G.Y,G.Z+a*E.Z)end wait(settings.remove_time)z:Destroy()end)a()end end function monitor_character(G)local z=G.humanoid.Health G.humanoid.HealthChanged:connect(function()if G.humanoid.Health<z then if z-G.humanoid.Health>=settings.damage_inc then for z=1,settings.splatters_per_health_inc*((z-G.humanoid.Health)/settings.damage_inc),1 do create_blood_splatter(G)if settings.max_splatter_time>0 then wait(math.random(settings.min_splatter_time*100,settings.max_splatter_time*100)/100)end end end end z=G.humanoid.Health end)end function monitor_player(G)repeat wait()until G.Character~=nil G.CharacterAdded:connect(function()local z={player=G;character=G.Character;torso=G.Character:WaitForChild("\084\111\114\115\111"),head=G.Character:WaitForChild("\072\101\097\100");humanoid=G.Character:WaitForChild("\072\117\109\097\110\111\105\100")}monitor_character(z)end)local z={player=G,character=G.Character,torso=G.Character:WaitForChild("\084\111\114\115\111");head=G.Character:WaitForChild("\072\101\097\100"),humanoid=G.Character:WaitForChild("\072\117\109\097\110\111\105\100")}monitor_character(z)end game.Players.PlayerAdded:connect(function(G)monitor_player(G)end)for G,z in ipairs(game.Players:GetChildren())do if z.ClassName=="\080\108\097\121\101\114"then monitor_player(z)end end


local blood_folder = Instance.new("Folder",game.Workspace)
blood_folder.Name = "Blood.Splatter.Particles"



function create_blood_splatter(player_class)
	local blood_parts = {"Left Leg","Right Leg","Torso","Right Arm","Left Arm","Head"}
	local chosen_part
	if(player_class.humanoid.Health <= 0) then
		repeat wait() chosen_part = blood_parts[math.random(1,#blood_parts)] until player_class.character:FindFirstChild(chosen_part)
		chosen_part = player_class.character[chosen_part]
		local blood_emmiter = script.Blood:Clone()
		blood_emmiter.Parent = chosen_part
		blood_emmiter.Enabled = true
	else
		chosen_part = player_class.torso
	end
	local ray = Ray.new(chosen_part.Position, Vector3.new(0,-100,0))
    local hit, position = game.Workspace:FindPartOnRayWithIgnoreList(ray, {blood_folder , unpack(player_class.character:GetChildren())} , true)
	if(hit) then
		local blood = Instance.new("Part",blood_folder)
		blood.Anchored = true
		blood.CanCollide = false
		blood.Transparency = 1
		blood.Name = "Particle_Blood"
		blood.FormFactor = Enum.FormFactor.Custom
		blood.Size = Vector3.new(0.01 , 0.1 , 0.01)
		blood.CFrame = CFrame.new(position)
		local blood_decal = Instance.new("Decal",blood)
		blood_decal.Transparency = 1
		blood_decal.Texture = "http://www.roblox.com/asset/?id=" .. blood_textures[math.random(1,#blood_textures)]
		blood_decal.Face = "Top"
		game.Debris:AddItem(blood,settings.remove_time+20)
		local edit_blood = coroutine.wrap(function()
			local original_size = blood.Size
			local original_transparency = blood_decal.Transparency
			local new_transparency = math.random(settings.max_transparency*100,settings.min_transparency*100)/100
			local new_size = Vector3.new(math.random(settings.min_size_x*100,settings.max_size_x*100)/100 , blood.Size.Y , math.random(settings.min_size_z*100,settings.max_size_z*100)/100)
			local tran_tw_time = math.random(settings.tran_tw_time_min*100,settings.tran_tw_time_max*100)/100
			local size_tw_time = math.random(settings.size_tw_time_min*100,settings.size_tw_time_max*100)/100
			for i = 1,10*tran_tw_time do
				wait()
				local perc = i/(10*tran_tw_time)
				blood_decal.Transparency = original_transparency - (perc*new_transparency)
			end
			for i = 1,10*size_tw_time do
				wait()
				local perc = i/(10*size_tw_time)
				blood.Size = Vector3.new(original_size.X+(perc*new_size.X) , original_size.Y , original_size.Z+(perc*new_size.Z))
			end
			wait(settings.remove_time)
			blood:Destroy()
		end)
		edit_blood()
	end
end





function monitor_character(player_class)
	local last_health = player_class.humanoid.Health
	player_class.humanoid.HealthChanged:connect(function()
		if(player_class.humanoid.Health < last_health) then
			if(last_health - player_class.humanoid.Health >= settings.damage_inc) then
				for i = 1,settings.splatters_per_health_inc*((last_health - player_class.humanoid.Health)/settings.damage_inc) do
					create_blood_splatter(player_class)
					if(settings.max_splatter_time > 0) then
						wait(math.random(settings.min_splatter_time*100,settings.max_splatter_time*100)/100)
					end
				end
			end
		end
		last_health = player_class.humanoid.Health
	end)
end





function monitor_player(player)
	repeat wait() until player.Character ~= nil
	player.CharacterAdded:connect(function()
		local player_class = {
			player = player,
			character = player.Character,
			torso = player.Character:WaitForChild("Torso"),
			head = player.Character:WaitForChild("Head"),
			humanoid = player.Character:WaitForChild("Humanoid"),
		}
		monitor_character(player_class)
	end)
	local player_class = {
		player = player,
		character = player.Character,
		torso = player.Character:WaitForChild("Torso"),
		head = player.Character:WaitForChild("Head"),
		humanoid = player.Character:WaitForChild("Humanoid"),
	}
	monitor_character(player_class)
end




game.Players.PlayerAdded:connect(function(player)
	monitor_player(player)
end)


for i,v in ipairs(game.Players:GetChildren()) do
	if(v.ClassName == "Player") then
		monitor_player(v)
	end
end


