Need help with my first ever automation

Please help us help you. The code formatting and the pictures are very hard to work from.