A Script that will open doors with an amount of coin

Hi I’m making a low poly game and I would want to know how would I make it as in each level there is amount of coins or jewels to open a door and there’s a number count on top. So like you need 100 coins or jewels to open this door to go on to the next level. What would I need or how would I create that script or if someone could create It I will credit you ty byeeee

Just a note, that people won’t be able to provide a full script with that little amount of detail:

  • Are you using Unity2D or Unity3D?
  • How are you storing your money?
  • Do you have a door script already?

Providing as much detail as possible will help us answer your questions.