how to rotating a wheel in the editor with on/off toggle in the properties

Godot Version

Godot 4.4

Question

hi how to I add a on and off checkbox that will rotate the meshinstance in the properties inspector in this script and also would like to view the animation rotation in real time in the editor…thanks in advance.
the script:

extends Node3D
@export var speed : Vector3 = Vector3(0,50,0)

func _process(delta):
rotation_degrees += speed * delta

You’ll need a @tool script for that.

thanks I added the tool it works…I discover that if you disable the process in the inspector it acts like a on/off…but I hope someone can help how to add a proper on/off in the inspector via script cannot find any tutorial online the ones available is when keys are press…I am looking for is a on/off in the inspector like the process settings I mention…