I might have destroyed files inside /usr/share/scripts but I assume that this folder is empty after an installation. Is that correct?
On my recent Elementary OS 5.0 install, there is no /usr/share/scripts. I'd suggest looking into what package provides that folder to attempt to determine if anything is missing.
dpkg -S /usr/share/scripts dpkg --verify $packagename
-V, --verify [package-name...] Verifies the integrity of package-name or all packages if omit‐ ted, by comparing information from the installed paths with the database metadata. The output format is selectable with the --verify-format option, which by default uses the rpm format, but that might change in the future, and as such programs parsing this command output should be explicit about the format they expect.