Hello! I’m gonna show my way of disabling a button in makecode (if you don’t want you character going up and down)
(just follow picture if you dont wanna follow text form

First is to get the [On button pressed/released] block in controller, Then get [If true/false] block in logic (set it to true). Then get the [Move sprite with buttons vx 100 vy 100] click on the plus to access the VY and VX thingy. Set both of those to zero (duplicate). Then get the same button block but set it to release, Get the VX/VY block and set it back to 100.
Example below!!
BEWARE that there is a small bug where if you do press up and down at the same time you will end up moving up or down!!
Hope this helps