Hi there. I just registered in this forum so that I could answer this question correctly.
The script is Siddham.
The first picture shows the syllables hāṃ māṃ (or KAN MAN if you ask a Japanese person) which are associated to Caṇḍamahāroṣaṇa / Acala (Jp.: Fudō Myōō).
The second picture shows the syllable hūṃ (or UN in Japan). The syllable hūṃ is associated with many different deities in Vajrayana Buddhism.
In this context it most likely represents Mahāvairocana (Jp.: Dainichi Nyorai).
Vairocanābhisaṃbodhi Sūtra, also know as the Mahāvairocana Tantra is an important text in Japan.
It has (as the name implies) Vairocana as most important figure in its centre.
In this text, Acala's mantra is used to overcome all kinds of obstacles on the path to enlightenment.
Sorry if I made any English mistakes. It's not my first language.
If you have any more questions regarding these kinds of topics, feel free to contact me.