I need help with code!

"Help" round here means you make an attempt at producing a program then when you have posted it here we help you to get it right.

There are examples in the IDE about reading buttons and others about using servos. Have a look at them and see what you can do.

Steve