The break
keyword in most programs, including Godot, stops the execution of an if statement or a for, while or any iterative loop. To 'break' out of a function, just use the return
keyword.
func _ready():
if some_condition:
print("true")
else:
return # breaks execution of the entire function
print("test")