Limit AUX

For my Gamemode I’m creating, i was wondering if there’s a function or command that i could use to limit sprint,
or AUX. Power or w/e so that it could be semi-realistic? I need help because i’m fairly new to this stuff. Please Respond.

I don’t know if there already is anything like that, but you could do that with a script
Only thing that comes to mind is limiting the player’s runspeed

Players start with the AUX value 100, when they hold down shift it goes down by 1 per 0.05 seconds
If it goes below 30, decrease the player’s runspeed
If it reaches 0, make the player’s runspeed equal their walkspeed
When they let go of shift, the AUX value increases by 1 per 0.1 seconds

(or something like that)