First you need to create you turret. You can use this one:
And use this bullet:
The bullet will need bullet movement.
You will also need something to shoot at. Make a simple stick man (I will not give you a picture of this because they are easy to draw).
You then need to create an invisible sprite called aim area. The size depends on how far you want it to shoot.
Then I am going to use the same way Ashley set out the events:
Condition:player-on-colition-with-aim-area
Condition:system-reapeat-10-times
action:turret-spawn-bullet
system:wait-1sec
now we need the bullet to aim so
Condition:bullet-on created
action:bullet-set angle towards (for x put player.x for y put player.y)
we will need a nother on to make the turret look at you so
Condition:system every tick
action:turret set angle towards (player.x player.y)
That's it, now you should have a frozen character that gets hit by the turret ten ten times before the character gets away.