Skip what the function is doing?

hello!

how do I make it so when ever I call a function for specific thing and this function for example is doing something like it check If a bool value is true then does something but how do I make it so if the bool changed to false for example and it still doing this thing that I told it to do when the value is true I wanted to skip what ever the value is doing if it’s true and do something else instead.

I hope I explained thist well. if you still don’t understand what I want or have any question please let me know

Are you talking about an if/else statement?

yes ,if value == true then
— do smt
else
— do smt
end