I'm not exactly sure how to combine two scripts, but I have my base script here to detect when a player has died and send it to discord
local Players = game:GetService("Players")
local HttpService = game:GetService("HttpService")
game:GetService('Players').PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(player)
player:WaitForChild("Humanoid").Died:Connect(function()
local data = {
content = player.Name .. " has died!";
username = "KillBot",
avatar_url = "http://www.roblox.com/Thumbs/Avatar.ashx?x=200&y=200&Format=Png&username="..player.Name
}
print(player.Name .. " has died!")
local webhook = "https://discordapp.com/api/webhooks/00000000000"
HttpService:PostAsync(webhook, HttpService:JSONEncode(data))
end)
end)
end)
How would I go about adding this to the script?
if Humanoid:FindFirstChild("creator") ~= nil then
local Killer = Humanoid.creator.Value
Everytime I add the last one I get an error saying end expected (. Thank you for the help.

2 comments
Hey, thanks for the reply. Which line would I put that in? Sorry for all the questions.
Maybe add it on Line 6?