Yep there is simple enough pet script you can attach to a pet that will adjust pet power, for example based on your stats and keep it in level.
I had this script fully functional back when I was working on my server 7 years back, but I lost all my files.
I plan to recreate it again in a few days, unless someone else beats me to it before that