Control a 12v from 5v.

Your description is unclear. Do you have the load connected:

(a) between the drain of the mosfet/collector of the TIP31 and +12v; or

(b) between the source of the mosfet/emitter of the TIP31 and 0v?

Method (b) will not work because only 4V or less will get passed to the load using the TIP31, and even less with the IRF730.

Method (a) will probably work with either the TIP31 or the mosfet. However, if you use the TIP31 then it may get hot because of the high saturation voltage. If you use the mosfet then it may also get hot because the IRF730 is designed to be switched from 10V not 5V, so it will not be turned on fully. The best solution is to use a logic-level mosfet instead.