Having trouble making a dynamic playpause Touch Bar button

Currently using this apple script:

if application "Spotify" is running then
tell application "Spotify"
if player state is playing then return "pause"
end try
end tell
end if

Regex is set to "pause"

However my button stays at the alternate image which is a pause logo the whole time.

config is set to execute every 1 second and to "always run when widget is visible"

Any help would be appreciated!!