The main problem has already been identified: interactions with the creative inventory fall outside normal game mechanics. You can verify this for yourself: pause your game, go to the statistics and click 'Items'; you will only see 6 item "interactions":
mined,
broken,
crafted,
used,
picked up and
dropped. As you can imagine: what you're looking for falls outside these categories.
But it can be done, and in my opinion it isn't as difficult as being claimed, though... maybe that's just me; it is a little complex when thinking about it I suppose. The keyword:
advancements! In specific: custom advancements, a good source of info on them can be found
here (official wiki page on advancements) and maybe you may also enjoy my
PMC guide on advancements.
See, the key to your problem is to detect "incoming" diamonds in a users inventory. And guess what? The
minecraft:inventory_changed trigger is
exactly what you need: it will detect a change in a players inventory. Set the trigger to look for diamonds and you're well on your way.
That's the other cool thing about advancements: they allow you to run a function as a form of reward. And just in case you (or a random reader) didn't know: a function is nothing more but a collection of Minecraft command(s), but stored in a separate file. That's the key to the scoreboard: as soon as a "diamond inventory change" has been detected you then "reward" the player by triggering a function which increases a predefined scoreboard entry, optionally you can even add a failsave check to make sure that there are actually diamonds added to the players inventory.
/scoreboard objectives add diamonds triggerIf you use a 'trigger objective' then the player can use the
/trigger command to increase this themselves. Well, the player or the server which uses the players credentials, for example when firing up a function.
It's been a while since I messed with this, but... I'll have a look see later this evening to see if I can cook something up.