make the starting gold the same minus the hero cost and do this trigger: event: clicks random hero button
if: first 5 min game
if: has no hero
then: give player x gold
then: purchase the random hero
sorry it is not in actual triggers, I have not been to the editor in awhile lol. I believe this could work though.