Grasshopper Pop up


I’ve been trying to reproduce a simple pop up in grasshopper… However, I’m stuck with the rotation part. I don’t know how parts can rotate together.
Can anyone show me how it’s done? (665.8 KB)
I have uploaded a picture of the pop-up and how it’s done.

Thank you,