Trying to add this code for a button but its not running correctly

You sketch (all tabs, combined) can only have one setup() and one draw(). You can’t combine two standalone sketches and have them work – if you have two setups, your sketch is already broken.

Do the error messages in the console tell you anything?