You can use local scripts in each player that interact with the boss's script to find out who damages or kills them by detecting if the boss health was 0 when you hit it. To do this, just use whatever attack method your using and you can do anything like setting a value, or if its a sword or something that touches it that the player is holding or belongs to the player in any way, then you can detect that with
LastPlayerToDamage = "none"
script.Parent.Touched:Connect(function(hit)
for _,i in pairs(hit:GetAncestors()) do
for _,ii in pairs(game.Players:GetChildren()) do
if i.Name == ii.Name then
LastPlayerToDamage = ii.Name
end
end
end
end)
BadgeID = 2124659474
script.Parent.Died:connect(function()
if not LastPlayerToDamage == "none" then
game:GetService("BadgeService"):AwardBadge(game.Players[LastPlayerToDamage].userID, BadgeID)
else
end
end)