You need to define dead zones where you can’t shoot lasers / you ignore shoot input if action happens there. There are various ways to detect dead zones. You could use collision objects. You could check if the action is higher than a certain y value and ignore it. You could use a function like below to see if the action x,y is within a certain rectangle at the top of the screen.
local function point_within_rectangle_centroid(point_x, point_y, rectangle_x, rectangle_y, rectangle_width, rectangle_height)
local width_half = rectangle_width / 2
local height_half = rectangle_height / 2
if point_x >= (rectangle_x - width_half) and point_x <= (rectangle_x + width_half) then
if point_y >= (rectangle_y - height_half) and point_y <= (rectangle_y + height_half) then
return true
end
end
return false
end