Reduce Transparency

I don’t know if anyone else is having this problem, but I can’t get my “Reduce transparency” setting to stay checked in the Display pane of the Accessibility pane. It keeps unchecking itself every so often.
In case anyone else needs it, this script seems to work to turn that setting back on.

use AppleScript version “2.4” – Yosemite (10.10) or later
use scripting additions
tell application “System Preferences”
activate
set theResult to reveal pane “Accessibility”
end tell

tell application “System Events”
tell process “System Preferences”
set frontmost to true
delay 2
set theRow to row 6 of table 1 of scroll area 2 of window 1
tell theRow
select
end tell
delay 1
end tell
end tell
tell application “System Events”
tell process “System Preferences”
set frontmost to true
click checkbox “Reduce transparency” of window 1
delay 1
end tell
end tell
tell application “System Preferences”
quit saving yes
end tell