If you make it very cleverly, it would be possible without editing the source, but I guess it'd be a bit complicated ;)
I'm talking about setting all the monsters to a tag, creating a function that checks the amount of monsters left in short intervals and sets the amount of money you have to: ((amount of money per killed monster) * (monsters on the map - monsters left)) - (money already spent).
Then make a shop with a gui where each button triggers a door behind which you can find a piece of ammunition or health.
It's possible but I'm not sure if it's worth that :P