*URGENT* proximity sensor code not working

stevenskintzis:
Sorry, I got the code from a friend because I don't know how to code

I DONT KNOW HOW TO CODE THAT'S WHY I AM ASKING...

And if you'd said that earlier instead of saying " I have attached my code" you might have got some different answers.

If you can post the complete latest version and then say exactly what problems you have with THAT version it will be a lot easier to help.

Steve