Redirect to other page when mobile

You could use wp_is_mobile with wp_redirect

if ( wp_is_mobile() AND is_front_page() ) {
    wp_redirect( $location, $status );
exit;
}

You can add the js directly to a front-page.php or home.php file or enqueue it directly from either file.

Example:

add_action('wp_enqueue_scripts', 'load_script');
function load_script(){
    wp_enqueue_script( 'script-handle', get_stylesheet_directory_uri() . '/js/your-script.js', array( 'jquery' ) );
}