Hi,
I have not seen such script and I do collect all available script and add link to them on this website:
ssas-info.com/analysis-services-scripts
I think the reason for that - if you have database on the server, then you must have it somewere offline project that you re-deploy when you need to. I usually do have such structure on my development machine and in Visual Source Safe, so I can recover it any time I need to. Database structure changes quite infrequently, so there is no real reason to backup structure (metadata) every night. I understand that you might have different environment so your requirements might be different from everybody else, but as majority of people do not need that - nobody wrote such script so far.