Uh how to make a monster give a player gold when killed

So how do I make a monster give gold to the player who killed it?

oh i can help do when unit dies set player attribute as last attacking players coins+ coins you want to give or use variable and then do set last attacking players coins as coins+ variable coins of trigering unit

just copy scripts from the pvp template

you is a fun killer lol reeeeeee