Help to understand code i found in a forum

I found this on a forum, but the person didn’t provide all the information, and I’m wanting to recreate what he did! could someone help me?

first part


second part