Limit Player's Wallet Size?

Is there a way to limit the size of the player's wallet?
Basically, I want the player's max wallet size to be much lower than the standard, but every method I try doesn't seem to work for me. I want the player to be able to upgrade the wallet size as well...

EDIT: I found a Yanfly script that limited the gold successfully.
Can you add a link to the script?
Code:
class Game_Party
  def max_gold
    return 99999999
  end
end
Adjust as u see fit, like
Code:
class Game_Party
  def max_gold
    return $game_variables[n]
  end
end
No need Yanfly's
@Dreadshadow It was Yanfly's Adjust Limits plugin: https://yanflychannel.wordpress.com/rmvxa/core-scripts/adjust-limits/

Decided just to hardcap the limit instead.
Thread closed IgnoreMe

Original thread: https://forums.rpgmakerweb.com/threads/limit-players-wallet-size.107508/