@demonslayer12349, your script is a little strange.
@adb shell su -c "mount -o remopunt rw, /"
@adb shell su -c "mount -o remount rw, /"
Then another thing. You delete 4 partitions and create only three.
For D410 partition 31 is "eksst". It is 0.5mb only. What is the reason to delete it?
Or the script is device-specific?
As I know LG software doesn't recreate partitions, so you have to do it manually.