Event scripts are stored in a table called 'event_script' and custom scripts are stored in a table called 'script_config'. You can back them up and export them out of the database.
The packages tab allows you to export scripts as a zip file and there's an API for package import/ export as well. This is very useful for back up and moving apps, schema, scripts, APIs etc. between DreamFactory instances. More info here http://wiki.dreamfactory.com/DreamFactory/Tutorials/Deployment/Packaging.