Move all the THEN commands to a PROC function.

Ex :

IF
GlobalEventSet("CaughtStealing")
THEN
ProcYourFunctionName(Variable1,Variable2...)

PROC
ProcYourFunctionName((VariableType)_Variable...)
THEN
CharacterTeleportPartyToTrigger(TRIGGER_Prison_P1,"");
CharacterTeleportToTrigger(CHARACTER_Guard, TRIGGER_Prison_Guard,0,"");
FadeToBlack(CHARACTER_Player1,500,1);