Online without Ban
If you want to play online with a modded game, read this post. To prevent a ban, always use the mods folder, not the games folder, and don't install mods designed to cheat online.
Can you run scripts online and get banned with Scripthook? According to Alexander Blade, the SH5 author: "Script Hook V is the library that allows to use GTA V script native functions in custom *.asi plugins. Note that it doesn't work in GTA Online, script hook disables custom scripts when player goes in multiplayer".
Source: AB Software Development
What about mods, not just scripts? According to the OpenIV developers: "With installed ASI loader and plugin, you will not be able to go into GTA Online. This will keep you from accidently [sic] banning and GTA Online will be protected from modifications." Source: https://openiv.com/?p=1082
So what happens if do try to go online? You get an alert. That's all. But, if you are still completely Paranoid, or if you just want to play no mods vanilla, go into your root folder and rename dinput8.dll to dinput8.bak and run your game. See also Quick Way to Play Without Mods. Alternatively you could disable/rename ScriptHookV.dll. This will also disable all mods, except for certain asi mods which don't require it such as a heap limit adjuster, but the game will know if it is modded and will not allow you online.
This is the alert message trying to go online with a modded game. (Hitting continue brings you back to SP Story Mode.)