how do i make it shoot?

init = function() movement_speed = 2 bullet_speed = 10 end

update = function() if keyboard.LEFT then x -= movement_speed end if keyboard.RIGHT then x += movement_speed end if keyboard.UP then y += movement_speed end if keyboard.DOWN then y -= movement_speed end if mouse.press then shoot = 1 else shoot = 0 end screen.clear("rgb(0,255,0)") end

draw = function() screen.drawSprite("player",x,y,100,100) end

i want this to spawn the "bullet" sprite and make the bullet sprite move forward until touching the wall then when it hits the wall it disappears