Hello, I'm having trouble making it so you can get coins on death. The people in my server have to die from the void, so I can't really do the simple method and just do normal player death. Here is my not-working code right now:
on damage:
set {lastattacker::%uuid of victim%} to attacker's uuid
on death:
if {lastattacker::%uuid of victim%} is set:
add 5 to balance of {lastattacker::%uuid of victim%} parsed as player
on damage:
set {lastattacker::%uuid of victim%} to attacker's uuid
on death:
if {lastattacker::%uuid of victim%} is set:
add 5 to balance of {lastattacker::%uuid of victim%} parsed as player