Time.time is "the time in seconds since the start of the game".
I assume that speedPickup() is only called when you actually pick up the object, so it's only being called once. If it occurs more than 6 seconds after the start of the game, speedBoost will immediately set the moveSpeed back to the originalSpeed.
(Preserving original answer and adding edits below)
Have you tried adding debug printouts to your code? I use this to debug that the code is being executed when/where I'd expect.
bool ApplyPickup (PlayerScript playerStatus)
{
print("ApplyPickup() called"); // ApplyPickup() has been called
switch (pickupType)
{
case PickupType.Health:
healthPickup();
break;
case PickupType.Speed:
print("Speed pickup found"); // found pickup of Enum type 'Speed'
PlayerScript.moveSpeed += 5000;
StartCoroutine("speedPickup");
break;
}
return true;
}
IEnumerator speedPickup ()
{
print("speedPickup() running"); // speedPickup() Coroutine running
yield return new WaitForSeconds(3);
PlayerScript.moveSpeed = PlayerScript.originalSpeed;
print("moveSpeed reverted to original"); // reverted the move speed
}
If all 4 messages print out when you pickup the speed boost, then your problem is with the application of your moveSpeed to your player movement. Otherwise, seeing which messages do and don't appear will help track down the problem.