How to add selfless healer proc to current GS macro?

First post, I love this macro but I’m looking to add flash of light only when it procs as instant cast to it. Pvp reasons. Is that possible? Thanks!

Sequences['Ret'] = {
    PreMacro = [[
/targetenemy [noharm][dead]
    ]],
    '/cast Judgment',
    '/cast Crusader Strike',
    '/cast Exorcism',
    '/cast !Avenging Wrath',
    '/cast !Execution Sentence',
    "/cast Templar's Verdict" ,
    '/cast Hammer of Wrath',
}

jaust add it as a seperate button.

try add this at the end after hammer line


'/cast Flash ofLight',
 '/stopcasting',

Hey Apaštalas Jack’as,

Any idea how I can add selfless healer to this one? Been trying…can’t get it to work.

Sequences['RPST'] = {
StepFunction = [[
		limit = limit or 1
		if step == limit then
			limit = limit % #macros + 1
			step = 1
		else
			step = step % #macros + 1
		end
	]],
    PreMacro = [[
/targetenemy [noharm][dead]
/cast [nostance: 1] seal of truth
/cast Avenging Wrath
    ]],
    '/cast Seraphim',
    '/cast Hammer of Wrath',
    '/cast Holy Prism',
    '/cast Judgment',
    '/cast Crusader Strike',
    '/cast Exorcism',
    "/cast Templar's Verdict",
    PostMacro = [[
/use [combat]13
/use [combat]14
/startattck
    ]],
}