Weapon purchasing system

Could someone help me make a script , so I could purchase new items in game.
I keep trying but I can’t figure it out?

there is so many ways to choose from to make this type of system, try searching on youtube for something like “shop system in unity” and im pretty sure you will find something.

Thank you sooooo much I found the perfect solution.