I’d say use a ModuleScript to handle each ability, a ServerScript to handle what functions are called in the module, and a LocalScript to tell the server when to activate what.
Always verify parameters, cooldowns, etc. server-side to prevent exploits.
That sounds like a better idea, but only if more than one function is required for each. Otherwise, there’s no point in it being its own module really.
If you didn’t found the solution yet, here is very good one:
Separate abilities into similar ability groups, like 5 functions per module, then make AbilityController, and make map that stores AbilityName → Ability Module reference
This way you can have less modules, while also have less work, of course you need to add map a lot of strings to a modules, but requiring 40 modules and requiring 5 + assigning keys isn’t that much of a difference
What I would do is make remote events that activates a script when the local script tells it to activate the ability. I would put all these remote functions in a singular script with tables that keep track of data so it cant be manipulated by the client. There may be a better way by using module scrips so take this with a grain of salt this is just what I have done in the past. Just make sure you make comments so its easy to read since like you said it would be 1500 lines long. Personally I would rather have a big script then many scripts.
I agree. Especially if you have to fix a bug or change something with the ability. It would be much easier then having to scroll through one huge script.
It depends on the script honestly. There is many situations where module scripts are good but in my opinion its also ok to use functions within the script. Its very important when you have a large script that you comment everything out so when you come back you know what you where thinking at the time. It also helps if two people are working on the same script.