Moving facade panels grasshopper

Does anyone have advice or a script that would let me animate these side panels so they swing inward toward each other and then return to their original position? I’d like to control the movement with a slider - ideally setting the rotation angle. The side panels are already modeled like they’re on a hinge.

I don’t really know where to even start with this..

CROMWELL CASTLE.3dm (19.6 MB)

cromwel.gh (139.6 KB)

Hi thank you so much for this how do i make this script connect to my panels? what do i change? As it looks like this when I input it some are also floating around in the back

For me everything works fine.
Upload the GH file.
To have a correct display, darken the “right panels” and “left panels” layers.

cromwel a.gh (140.8 KB)

In case you don’t have the FabTools plugin installed, I replaced the external component with native components.

cromwel b.gh (14.6 KB)