Download

Problems in my close/open tv

I want to make a tv that starts when i press e and closes when i press e
but i have 2 problems
1 tv is already opened when i press play
2 i cant close tv when i press e second time its only stops
how to fix these