I was wondering how the leaderboard found the killer when someone dies.
The leaderboard doesn't. You have to make a custom script with your weapons. For Example:
If the player hits another with a weapon, it'll insert a stringvalue into the player that's hit with the players name. Then you need to have another script that detects if a player died. If the script finds the string value, it'll increase the killers kills by one.