1. Rather than checking positions you can check if the tween has stopped playing using integer GetTweenSpritePlaying( tweenID, spriteID )
2. rather than deleting spr_score i think you should move it off screen so you can use it next time SetSpritePosition(spr_score, -100, -100)
Click the mouse to make the sprite move
spr_score = CreateSprite(0)
SetSpriteColor(spr_score, 0xff, 0, 0, 0xff)
xpos=171
ypos=455
SetSpritePosition(spr_score,-100,-100)
SetSpriteSize(spr_score,40,40)
CreateTweenSprite(1,2.0)
SetTweenSpriteYByOffset(1,ypos,0,TweenLinear())
do
if GetPointerPressed() = 1
setspriteposition(spr_score, xpos, ypos)
PlayTweenSprite(1,spr_score,1.0)
endif
newY=GetSpriteYByOffset(spr_score)
if GetTweenSpritePlaying( 1, spr_score ) = 0 and GetSpriteY(spr_score) <> -100
SetSpritePosition(spr_score,-100,-100)
endif
print("X = "+str(GetPointerX(),2))
print("Y = "+str(GetPointerY(),2))
print("Sprite Y ="+str(GetSpriteYByOffset(spr_score),2))
UpdateAllTweens( getframetime() )
sync()
loop