Check if playhead has passed on the timeline

Can somebody help me out with this script?

If (playhead has played frame 15) then ------------ I need the script for this :cantlook:
gotoandplay (10)
or else
gotoandplay (20)

Please do reply even if this sounds stupid…
thanks…