Stop a sprite

Hi, i have this code

-- Use this function to perform your initial setup
function setup()
    print("Hello World!")
    spx=WIDTH/2
    spy=HEIGHT/2
end

-- This function gets called once every frame
function draw()
    -- This sets a dark background color 
    background(40, 40, 50)
    sprite("Planet Cute:Character Boy",spx,spy)
    -- This sets the line thickness
    strokeWidth(5)

    -- Do your drawing here
    
if move==true then
        spx=spx+2
    end
end

function touched(t)
    if t.state==BEGAN then
        move=true
    end
end

What i want it to do is when i tap the screen for the second time, the sprite stops moving, how would i do this??

How about

function touched(t)
    if t.state==BEGAN then
        move=not move --toggles move on and off
    end
end