Just put this under a repeat/while loop:
if PedGetFaction(PedGetGrappleTargetPed(gPlayer)) == 0 or PedGetFaction(PedGetGrappleTargetPed(gPlayer)) == 7 or PedGetFaction(PedGetGrappleTargetPed(gPlayer)) == 8 or PedGetFaction(PedGetGrappleTargetPed(gPlayer)) == 9 or PedGetFaction(PedGetGrappleTargetPed(gPlayer)) == 10 then
PedSetActionTree(PedGetGrappleTargetPed(gPlayer), "/Global/GS_Male_A", "Act/Anim/GS_Male_A.act")
PedSetActionNode(PedGetGrappleTargetPed(gPlayer), "/Global/1_02/ShortIdle", "Act/Conv/1_02.act")
PedSetActionNode(gPlayer, "/Global/1_02/ShortIdle", "Act/Conv/1_02.act")
PedSetFaction(PedGetGrappleTargetPed(gPlayer),6)
Wait(1)
PedSetActionNode(gPlayer,"/Global/Player","Act/Player.act")
This will push away the authority figure.