is there a way to make a command require an amount of level before usage?

im trying to make a function that summons a mob, but the thing is that it can only run when i have more than 50 levels on me.
Continue to help post