I need help with code!

Use code tags.

The delay() function is very common in the simple tutorials. However it is rarely used in real programs. Find the Blink-Without-Delay tutorial and modify that to do what you want.