1st: you wouldnt even need the sleep
2nd: check if the weapon is not Test/One..
PHP Code:
temp.except = {"Test/One"}; //array of weapons starting with 'Test/' which should not be removed
for (temp.w: player.weapons) {
if (temp.w.starts("Test/") && !(temp.w in temp.except)) player.removeWeapon(temp.w)
}