That is literally the most efficient programming in SmileBASIC I've ever seen, try this: WHILE 1 INPUT "(...)",BGM IF !(BGM>42||0>BGM) THEN BREAK WEND BGMPLAY BGM WHILE 1:WEND