Question (anticheat)

How can I prevent the extra scripts from starting after the server is opened?

An easier solution to your problem is just to record every event that happens on a certain entity, inventory, vehicle, or ped. The AntiCheese Anticheat is a good example of a system that does just that. It looks for “questionable” changes in player variables. Check it out.

Simple answer. You can’t…
However it is possible to detect if some of your resources metadata size’s has been changed during the client being in your server…
This will protect you from abuse lua files being injected in your resources (client side)
A native that can help you create the detection: GetResourceMetadata - FiveM Natives @ Cfx.re Docs