Last one to post in this thread wins!

Been working on a chevy cobalt 2009 2.2 L that my 18 year old bought that runs but has a real bad clanking noise coming out what sounds like the front of the engine. took the valve cover off and found #4 exhaust rocker was laying in the side of the head not on it's pivot and the timing chain was loose. So put the rocker back in place and gave it a compression test all were good but # 4 cyl. was dead. Guessing it ate a valve and that's what the noise is.
Looks like I need a new engine but not sure. I can get a junk yard one for under $1000 with about 83,000 on it. Any of you guys have some advice on what to do would sure help.