get_user_gravity and get_user_maxspeed ? Then store them if those functions exist, then change them with set_user_whatever. When you want to change them back, just set them again to the varibles stored in wherever you stored the get_user_whatever stuff.