Custom win / death handler keeps bugging for no reason

I’m having a nightmare about this script and I can’t fix it what so ever. It keeps sending out messages like “you won against name” and"you lost against name" even when they tie… Is there any reason to why this happens?

local Players = game:GetService("Players")
local Event = game:GetService("ReplicatedStorage"):FindFirstChild("Events"):FindFirstChild("PLAYER_KILLED_PLAYER")

Players.PlayerAdded:Connect(function(Player)
	Player.CharacterAdded:Connect(function(Character)
		local Humanoid = Character:FindFirstChildOfClass("Humanoid")
		if Humanoid then
			local h = Instance.new("StringValue")
			h.Name = "creator"
			h.Parent = Humanoid
			Humanoid.Died:Connect(function()
				if game:GetService("CollectionService"):HasTag(Player, "Starter Pack") then
					game:GetService("ServerStorage"):FindFirstChild("Death Effect"):Clone().Parent = Character:FindFirstChild("HumanoidRootPart") or Character:WaitForChild("HumanoidRootPart")
				end
				wait(1)
				local Stats = Player:FindFirstChild("leaderstats")
				if Stats then
					local Reset_Killstreak = Stats:FindFirstChild("Killstreak")
					if Reset_Killstreak then
						Reset_Killstreak.Value = 0		
						local Folder = game:GetService("ServerScriptService"):FindFirstChild("DataStore")
						local Deaths = Folder[Player.Name]:FindFirstChild("Total Deaths")
						if Deaths then
							Deaths.Value = Deaths.Value + 1
							local Tag = Humanoid:FindFirstChild("creator")
							if Tag then
								local Killer = Players:FindFirstChild(Tag.Value)
								if Killer then
									local Check_Killer = Killer.Character:FindFirstChildOfClass("Humanoid")
									print("Killer:", Check_Killer.Health)
									if Check_Killer.Health < 2 then
										return
									end
									
									Event:FireClient(Player, Killer.Name, Killer.TeamColor, "DEFEATED")
									Event:FireClient(Killer, Player.Name, Player.TeamColor, "KILLED")
										
									local Killer_Stats = Killer:FindFirstChild("leaderstats")
									if Killer_Stats then
										local Killer_Wins = Killer_Stats:FindFirstChild("Wins")
										if Killer_Wins then
											Killer_Wins.Value = Killer_Wins.Value + 1
											local Wins = Folder[Tag.Value]:FindFirstChild("Total Wins")
											if Wins then
												Wins.Value = Wins.Value + 1
												local Killstreak = Killer_Stats:FindFirstChild("Killstreak")
												if Killstreak then
													Killstreak.Value = Killstreak.Value + 1
													local Killstreak_Folder = Folder[Tag.Value]:FindFirstChild("Best Killstreak")
													if Killstreak_Folder then
														if Killstreak.Value < Killstreak_Folder.Value then
															Killstreak_Folder.Value = Killstreak_Folder.Value + 1
														else
															Killstreak_Folder.Value = Killstreak.Value
														end	
													end
												end	
											end
										end
									end	
								end	
							end		
						end	
					end		
				end
			end)
		end
	end)
end)

Ah perfect I can help here, I’ll need some time. We’ll have to check in-game because the script seems to be fine. I think it’s just something that needs to added.

Also, I would make sure to check the killers of each other. For example, if I kill Noobmaster69 and I am his killer, I will be examined before getting the w. There should be an if check that checks my health and my killer. If my health is 100, I win. If my health is 0 and my killer is Snapper3000, I win. However, if my health is 0 and my killer is Noobmaster69, we tie.

Well it’s annoying and it shouldn’t really happen, I have the wait because the Humanoid:Died() event doesn’t fire at the same time, so there will always be a delay, and I think that is the issue here.