better dice for better int/wis scores.
3-9 = you cant cast spells.
18+=2d6 and reroll the lower number
Starting mana pool = your intellect score for wizards, wisdom for clerics, bard uses charisblahblah.
Roll your mana dice when you level, add result to mana pool.
Divide up spells based on level or something, give them each a die. Make the caster roll them if they want to cast that spell. subtract that number from your mana pool.
and if you're like I have 3 mana left and you roll magic missile (like a d4 probably) and it costs 4 mana
OHSHIT MANA BURN take 1 point of temporary intellect damage until you can get some sleep or go to a library or whatever. Or if its a non damage spell like polymorph roll a save against the backfire with the 1 point remainder hindering the roll.
5 minute breaks give you your relevant ability modifiers worth of mana back.
Hour long rests get you a rolls worth on your mana dice.
Mana pools fully regenerate after a full nights rest.
Spells that use max mana do extra damage.
Wizards using this system probably look like this.