Walking after stopping from toggle sprint

Trying to make it so when you stop sprinting or get interrupted it would set its value back to walk speed and I’m trying to do it with a second movement speed after a set time just in case that layout needs to change