Please use Code tags next time.
As for your issue:
if (rb.position.y < -1y) FindObjectOfType<EndGame>().EndGame1(); }
You’re missing a { there.
{
(Error CS1002 usually means a semicolon is missing, but not in this case.)