How to execute certain code based on game mode the player chooses

Im currently developing a game that has many different modes the player can enter in such as a horde mode, story mode and free run mode, which they access through the main menu. For example in horde mode I dont want the player to have the ability to wall run but in free run mode I do. Do all abilities and components that I want removed or added based on the mode need to be in separate scripts? How do i go about accomplishing this?

i believe you have to build diefferent scenes for each game mode. from what i understand about your game, you should have scripts that are identical between the scenes (player movement for example), and some scripts will be diefferent (spawn manager for example).