This is C++ but it shouldn't be hard to convert.
Code:
Angle angle;
Angle m_ViewAngle ;
Angle OldAngle;
int ShotsFired = 0;
while(true)
{
if (GetAsyncKeyState(0x01)){
ShotsFired = mem.read<int>(GetLocalPlayer() + m_iShotsFired);
if (ShotsFired > 1){
m_ViewAngle = GetViewAngle();
Angle m_PunchAngle = GetPunchAngle( );
m_ViewAngle.x = m_ViewAngle.x + OldAngle.x;
m_ViewAngle.y = m_ViewAngle.y + OldAngle.y;
// Add the old "viewpunch" so we get the "center" of the screen again
angle.x = m_ViewAngle.x - m_PunchAngle.x*2;
angle.y = m_ViewAngle.y - m_PunchAngle.y*2 ;
// remove the new "viewpunch" from the viewangles
SetViewAngle(angle);
OldAngle.x = m_PunchAngle.x*2;
OldAngle.y = m_PunchAngle.y*2;
// save the old "viewpunch"
}else{
OldAngle.x = 0;
OldAngle.y = 0;
}
}else{
OldAngle.x = 0;
OldAngle.y = 0;
}
}