I need a way to make it so that every time a player picks up a gold nugget, it raises his/her XP Level by 1. Is it possible? I really need help.
First you have to add a scoreboard that tracks the pickup:
/scoreboard objectives add pickupNugget stat.pickup.minecraft.gold_nugget
And then you can use the /xp command on players who have at least one point (they have picked up at least one golden nugget) and then reset the score:
/xp 1 @a[score_pickupNugget_min=1]
/scoreboard players reset @a[score_pickupNugget_min=1] pickupNugget