Re: Scripts glitching and crashing the game.
It may be caused by outdated mods. You mentioned removing the mods folder, and resetting the Sims 4 folder. But you don't mention going through your mods folder to make sure everything is up to date with the latest patch.
Custom content can become outdated with most new game patches. If the game works when the Mods folder is removed, then one or more of the mods and/or custom content has become outdated and will need to be removed or replaced.
To fix mods and custom content try the 50/50 method:
1. Move all the mods and cc out into a temporary folder on the desktop.
2. Move a few files back at a time. Load the game to make sure it loads and everything is good.
3. Delete the localthumbcache.package from the Sims 4 folder.
4. Repeat steps 1 - 3 till there is no more files to check.
** While your testing, don't save the game. If you find any problems, delete the mod or custom content file.
How To Find Problem Mods and CC - http://simswiki.info/wiki.php?title=Game_Help:TS4_Finding_Problem_Custom_Content