Here's my attempt. Double click the sprite within 0.3 seconds and it will change colour
sprButton = CreateSprite(0)
SetSpriteSize(sprButton, 200, 200)
SetSpritePosition(sprButton, 200, 200)
clickCount = 0
clickTimer# = 0
do
if (GetPointerPressed())
inc clickCount
clickTimer# = Timer()
endif
if (clickTimer# + 0.3 <= Timer() and clickCount = 1) then dec clickCount
if (GetPointerReleased())
if (clickCount = 2)
SetSpriteColor(sprButton, random(155, 255), random(155, 255), random(155, 255), 255)
clickCount = 0
endif
endif
loop