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

I was able to get it figured out, thanks!