code doesnt work can someone help

Godot Version

newest

can someone explain why it doesnt work

extends Control
func _process(delta):
	testEsc()
	push_error()

func _on_quit_pressed():
	get_tree().quit()

func resume():
	get_tree().paused = false
func pause():
	get_tree().paused = true



func testEsc():
	if Input.is_action_pressed("esc"):
		push_error()
		pause()
		Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE)
	elif Input.is_action_just_pressed("esc") and get_tree().paused == true:
			resume()
			Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)

func _on_resume_pressed(): 
	resume()

func _on_options_pressed():
get_tree().change_scene_to_file(“res://scenes/options ingame.tscn”)

You’re not actually saying what doesn’t work here, what’s the issue you want help with?

What exactly do you mean by “it doesn’t work”?
Anyway, the common issue is that once you call get_tree().paused = true, the scene stops receiving input events, so the following line would never be true.