His father gave him money for his university fees but he spent it on other things
Praise be to Allah
What a father gives his son to cover tuition costs is not for him to keep, in most cases, and the father does not intend, when giving it to his son, for the son to spend it however he wishes. Rather it comes under the heading of spending on relatives, and is conditional on the recipient being in need of it. At the same time, it is money that is given for a specific purpose, which is to pay the university fees.
The scholars have stated that if a person is given money to spend on specific expenses, it is not permissible for him to spend it on anything else, as has been explained previously in fatwa no. 191708.
Therefore what you must do is tell your father what happened, which comes under the heading of honouring your father first of all, and because this is a trust that your father gave you, to spend it on your education. That is why you are feeling some discomfort in your conscience because of what happened, which indicates that you are pure at heart and are keen to do that which is pleasing to your Lord. So what you must do now is hasten to set things straight, and may Allah pardon and forgive you.
And Allah knows best.