I recommend saving the object to a variable and then operating on it
Code (Text):
set pdc tag "namespace:tag_name" of <object> to <value>
Code (Text):
set {_variable} to pdc tag "namespace:tag_name" of <object>
Code (Text):
delete pdc tag "namespace:tag_name" of <object>
Code (Text):
on death:
victim and attacker are a player
set {_tool} to attacker's tool
if pdc tag "weapons:kills" of {_tool} is not set:
set pdc tag "weapons:kills" of {_tool} to 0
else:
set {_kills} to pdc tag "weapons:kills" of {_tool}
add 1 to {_kills}
set pdc tag "weapons:kills" of {_tool} to {_kills}
set player's tool to {_tool}