addEventHandler(\"onClientClick\", root,
function(button, state, _, _, worldX, worldY, worldZ)
   if button == \"left\" then
      if state == \"down\" then
         if worldX and worldY and worldZ then
            local playerX, playerY, playerZ = getElementPosition(localPlayer)
            local waterFound, waterX, waterY, waterZ = testLineAgainstWater(playerX, playerY, playerZ, worldX, worldY, worldZ)
            
            if waterFound then
               outputChatBox(\"Víz található a kiválasztott területen.\")
            else
               outputChatBox(\"Nincs víz a kiválasztott területen.\")
            end
         end
      end
   end
end
)