There are 10 total stars available in the game, once you have installed the Halloween update and have unlocked Cheats and Challenges by clearing 20/20/20/20 Mode.
Star 1 - Clear Night 5
Star 2 - Clear Night 6
Star 3 - Clear Night 7 (Nightmare Mode)
Star 4 - Clear Night 8 (20/20/20/20 Mode)
Once you have the above stars, then you can add specific challenges while clearing stages to obtain the remainder of the stars, as outlined below.
Complete Night 7 with any challenge active
Complete Night 7 with Blind Mode, Mad Freddy, and Insta-Foxy active
Complete Night 7 with All Nightmare active.
All Nights
To "finish" all nights and unlock nights 6 and 7, follow the steps indicated below.
Access the Start menu
Type in: %appdata%
Proceed to MMFApplications
Find the file titled "fn4" (without the quotes)
Open it with Notepad
Copy and paste the following within it: night=5 beatgame=1 beat6=1 test=1 beat5=1 beat7=1 beat8=1 scene=5
Cheats and Challenges
First, make sure that you have the Halloween update installed. Then beat 20/20/20/20 Mode. Once you have done so, check the "Extra" menu to find a new "Cheats and Challenges" option.
Unlock Night 7 (Nightmare Mode)
After you complete Night 6, you can head to "Extra" from the main menu and select the "Nightmare" option, which appears under "Jumpscares" and "Fun with Plushtrap."
Unlock Night 8 (20/20/20/20 Mode)
To unlock Night 8, you need to head to the "Extra" menu and enter 20202020. The new option will appear under "Fun with Plushtrap," in place of the "Nightmare" option. For that reason, you will need to have completed up through Night 6 in order to be able to play Night 8.