in Blueprints… just use the Get Velocity node for an actor, or Get Component Velocity for an actor component
This will give you a vector value of the direction the player is moving in. Also, if you use Vector Length with it, this will give you a float value… which is speed.