After 2 days of researching about pistons, and 3+ hours of barely working coding, I finally bring to you a working version of the SRIMRSA All Purpose Lander.
When you spawn it on the ground, it will automatically open the solar panels after 5 seconds. When you spawn it in orbit or anywhere above ground, it stays closed.
When you land:
One by one, enable activation group 1 & 2
Activate activation group 3 and immediately after, move slider 1/2 (I forget which one, I just want to get this out ASAP and I am not re-typing this description for the 3rd time) to 100.
When about to take off:
Set slider 1/2 to 0, and quickly deactivate activation group 3.
Then, do as you did when landing and slowly disable activation group 2 & 1.
I will make an attempt to have it always automatically open the panels when you land and close when you take off, but that may take a while.
Leave suggestions in the comments below, and I'll make submissions in the next creation by SRIMRSA.