How to make button control LED!?!?!

(deleted)

In the IDE examples there is a sketch called stateChangeDetection (File, Examples, Digital) that will show how to do that.

(deleted)

To be more specific

That was NOT more specific. More specific would have been to post your code.

(deleted)

That code is very long winded. However as you never set the LEDL variable to false.
All that code after the xbox if can be done in two lines.

digitalWrite(LED,LEDL);
LEDL = !LEDL

If getButtonPressed returns 1 for so long as the button was pressed, then this code will make the led flick on and then off (in about a microsecond or so) and then stay off.

The problem is that you don't want to toggle the LED whenever the button is in a state of being pressed, you want it to toggle when the button goes from not pressed to pressed. To do this, you have to remember what state the button was in last time you executed the loop.

(deleted)

(deleted)

The problem is now how to code to make the LED turn on when i CLICK a button, and turn off if I click it again

Why is this a problem? You have already written the code!