first datapack help?

since im trying to make a rust kinda mechanic server but one thing im missing is the block upgrades

so i have this idea where if you click an oak plank with any type of stone while sneaking, it replaces the wood with the stone youre holding(only if sneaking)

i have alot of creative ideas but i cant make datapacks and i know how things work but sadly im also not good at commands..

can anyone help? or if anyone could make this for free ill appreciate it!

Continue to help post