What precise roll did God play?
See, however,
15 And Pharao seeing that rest was given, hardened his own heart, and did not hear them, as the Lord had commanded.At times the scripture says that God hardened his hart, at the times cited above it says that he hardened his own heart. It is also made clear that all these hardenings were contrary to what God commanded, namely departure form Egypt. We have to conclude that God's participation in Pharaoh's decisions was a part of the master plan of the liberation of the Jewish race, and intended to strengthen their faith.(Exodus 8)
7 And Pharao sent to see: and there was not any thing dead of that which Israel possessed. And Pharao's heart was hardened, and he did not let the people go
35 And his heart was hardened, and the heart of his servants, and it was made exceeding hard: neither did he let the children of Israel go, as the Lord had commanded by the hand of Moses
(Exodus 9)
15 For when Pharao was hardened, and would not let us go, the Lord slew every firstborn in the land of Egypt, from the firstborn of man to the firstborn of beasts: therefore I sacrifice to the Lord all that openeth the womb of the male sex, and all the firstborn of my sons I redeem.
16 And it shall be as a sign in thy hand, and as a thing hung between thy eyes, for a remembrance: because the Lord hath brought us forth out of Egypt by a strong hand. (Exodus 13)