## Make sure to save your custom function structured inside folders (like I did)
## Do not change anything other than the round brackets. Do NOT change the tempid value unless you absolutely have to.

## This saves the player's ID and the custom nbt tags that you want to add
execute store result storage db:(yourtempstorage) tempid int 1 run scoreboard players get @s db.id
execute store result storage db:(yourtempstorage) (yourtempcustomnbt) int 1 run (whatever you want to save)
## This saves the temporary data
function db:(yourfunction)/save with storage db:temptime
## This resets your temporary storage
data remove storage db:(yourtempstorage) tempid
data remove storage db:(yourtempstorage) (yourtempcustomnbt)

## Call this function in db:core with the needed conditions to make it work [default, saves data every 10 seconds: execute as @a[scores={db.dataupdate=200..}] at @s run function db:(yourfoldername)/core]
## Make sure to copy your added NBT data to the delete function
## Dont Forget to Change the File Format to .mcfunction