First off, don't check every frame if the player has collected 50 collectables. You should check when you collect one instead.

As for your...