First real script!

Stupid, really stupid
I mean how the hell I got ideah to place all in while loop