state = 0

registerForEvent("onUpdate", function()
    local res = GetAsyncKeyState(0x55) -- press U
    if res ~= space_state then
        space_state = res
        if space_state then

        	state = state + 1

        	print("Undress State: " .. state)

        	if(state == 1) then
        		Game.UnequipItem('UnderwearTop', 0)
				Game.UnequipItem('UnderwearBottom', 0)
			end

			if(state == 2) then
				Game.EquipItem('Items.Underwear_Basic_01_Bottom')
			end

			if(state == 3) then
				Game.EquipItem('Items.Underwear_Basic_01_Top')
				state = 0
			end
			
        end
    end
end)